diff options
Diffstat (limited to 'sonar-maven-plugin')
-rw-r--r-- | sonar-maven-plugin/src/main/java/org/sonar/maven/SonarMojo.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sonar-maven-plugin/src/main/java/org/sonar/maven/SonarMojo.java b/sonar-maven-plugin/src/main/java/org/sonar/maven/SonarMojo.java index ab0123210f5..eb57053ba8a 100644 --- a/sonar-maven-plugin/src/main/java/org/sonar/maven/SonarMojo.java +++ b/sonar-maven-plugin/src/main/java/org/sonar/maven/SonarMojo.java @@ -19,8 +19,6 @@ */ package org.sonar.maven; -import java.io.InputStream; - import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.classic.joran.JoranConfigurator; import ch.qos.logback.core.joran.spi.JoranException; @@ -42,8 +40,12 @@ import org.apache.maven.project.MavenProjectBuilder; import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder; import org.slf4j.LoggerFactory; import org.sonar.batch.Batch; -import org.sonar.batch.MavenReactor; +import org.sonar.batch.MavenProjectConverter; import org.sonar.batch.bootstrapper.EnvironmentInformation; +import org.sonar.batch.bootstrapper.ProjectDefinition; +import org.sonar.batch.bootstrapper.Reactor; + +import java.io.InputStream; /** * @goal sonar @@ -143,7 +145,9 @@ public final class SonarMojo extends AbstractMojo { } private void executeBatch() throws MojoExecutionException { - MavenReactor reactor = new MavenReactor(session); + ProjectDefinition def = MavenProjectConverter.convert(session.getSortedProjects()); + Reactor reactor = new Reactor(def); + Batch batch = new Batch(getInitialConfiguration(), reactor, session, project, getLog(), lifecycleExecutor, pluginManager, artifactFactory, localRepository, artifactMetadataSource, artifactCollector, dependencyTreeBuilder, |