Skip to content

Commit

Permalink
Move test projects out of classpath
Browse files Browse the repository at this point in the history
  • Loading branch information
henryju committed Dec 17, 2020
1 parent a164f5f commit 3ff229a
Show file tree
Hide file tree
Showing 23 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ public void verbose() throws Exception {

private File executeProject(String projectName, String... properties) throws Exception {

File baseDir = new File("src/test/resources/org/sonarsource/scanner/maven/SonarQubeMojoTest/" + projectName);
File baseDir = new File("src/test/projects/" + projectName).getAbsoluteFile();
SonarQubeMojo mojo = getMojo(baseDir);
mojo.getSession().getProjects().get(0).setExecutionRoot(true);
mojo.getSession().setAllProjects(mojo.getSession().getProjects());

Result<? extends ProjectDependencyGraph> result = mojoRule.lookup( GraphBuilder.class ).build( mojo.getSession() );
mojo.getSession().setProjectDependencyGraph( result.get() ); // done by maven in a normal execution
Result<? extends ProjectDependencyGraph> result = mojoRule.lookup(GraphBuilder.class).build(mojo.getSession());
mojo.getSession().setProjectDependencyGraph(result.get()); // done by maven in a normal execution

mojo.setLog(mockedLogger);

Expand Down
File renamed without changes.

0 comments on commit 3ff229a

Please sign in to comment.