diff options
Diffstat (limited to 'sonar-maven3-plugin/src')
-rw-r--r-- | sonar-maven3-plugin/src/main/java/org/sonar/maven3/SonarMojo.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sonar-maven3-plugin/src/main/java/org/sonar/maven3/SonarMojo.java b/sonar-maven3-plugin/src/main/java/org/sonar/maven3/SonarMojo.java index c8e65ab678e..8c9b821722a 100644 --- a/sonar-maven3-plugin/src/main/java/org/sonar/maven3/SonarMojo.java +++ b/sonar-maven3-plugin/src/main/java/org/sonar/maven3/SonarMojo.java @@ -39,6 +39,7 @@ import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder; import org.slf4j.LoggerFactory; import org.sonar.api.platform.Environment; import org.sonar.batch.Batch; +import org.sonar.batch.MavenReactor; import java.io.InputStream; @@ -69,10 +70,9 @@ public final class SonarMojo extends AbstractMojo { */ private LifecycleExecutor lifecycleExecutor; - /** * The artifact factory to use. - * + * * @component * @required * @readonly @@ -81,7 +81,7 @@ public final class SonarMojo extends AbstractMojo { /** * The artifact repository to use. - * + * * @parameter expression="${localRepository}" * @required * @readonly @@ -90,7 +90,7 @@ public final class SonarMojo extends AbstractMojo { /** * The artifact metadata source to use. - * + * * @component * @required * @readonly @@ -99,7 +99,7 @@ public final class SonarMojo extends AbstractMojo { /** * The artifact collector to use. - * + * * @component * @required * @readonly @@ -108,7 +108,7 @@ public final class SonarMojo extends AbstractMojo { /** * The dependency tree builder to use. - * + * * @component * @required * @readonly @@ -127,16 +127,15 @@ public final class SonarMojo extends AbstractMojo { executeBatch(); } - private void executeBatch() throws MojoExecutionException { + MavenReactor reactor = new MavenReactor(session); Batch batch = new Batch(getInitialConfiguration(), - session, project, getLog(), lifecycleExecutor, artifactFactory, + reactor, session, project, getLog(), lifecycleExecutor, artifactFactory, localRepository, artifactMetadataSource, artifactCollector, dependencyTreeBuilder, projectBuilder, Environment.MAVEN3, Maven3PluginExecutor.class); batch.execute(); } - private void initLogging() throws MojoExecutionException { LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); JoranConfigurator jc = new JoranConfigurator(); |