diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-04-09 02:19:28 +0400 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-04-26 13:00:11 +0400 |
commit | e174628696636f74808f61c76a44da994edcadc7 (patch) | |
tree | 06af7a9e94d17294cce72ddded48a84c8b2b3f1f /sonar-maven3-plugin/src | |
parent | 4eb630d0ff939898efdd9ef29330736ca4e50ebc (diff) | |
download | sonarqube-e174628696636f74808f61c76a44da994edcadc7.tar.gz sonarqube-e174628696636f74808f61c76a44da994edcadc7.zip |
SONAR-2298 Add support for multi-modules for non-Maven projects
* Use ProjectDefinition in ProjectTree instead of MavenProject
* Allow to specify extensions for project's container via
ProjectDefinition, so MavenProject not passed directly to batch in mojos
* ProjectDefinition should store all information in properties
* Replace DefaultProjectFileSystem by DefaultProjectFileSystem2, which
works not only for Maven projects
* Add DefaultProjectClasspath, which works not only for Maven projects
* Enable ProjectLinksSensor only for Maven
Diffstat (limited to 'sonar-maven3-plugin/src')
-rw-r--r-- | sonar-maven3-plugin/src/main/java/org/sonar/maven3/SonarMojo.java | 12 |
1 files changed, 8 insertions, 4 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 baca606b874..7bb5e3e5f69 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 @@ -19,8 +19,6 @@ */ package org.sonar.maven3; -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; @@ -41,8 +39,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 @@ -136,7 +138,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, artifactFactory, localRepository, artifactMetadataSource, artifactCollector, dependencyTreeBuilder, |