diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-10-05 00:44:37 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2011-10-07 13:36:25 +0200 |
commit | ef5bf7fdece84e5a52c8d478c8a733ecdf4d57f1 (patch) | |
tree | c64a8a041183379e92fbc81becc77af07c9b38e3 /sonar-maven3-plugin | |
parent | 3174a29201e922db758b51f4b693ca131e7037ec (diff) | |
download | sonarqube-ef5bf7fdece84e5a52c8d478c8a733ecdf4d57f1.tar.gz sonarqube-ef5bf7fdece84e5a52c8d478c8a733ecdf4d57f1.zip |
SONAR-2861 New Configuration API
The component org.apache.commons.Configuration is still available but plugins should use org.sonar.api.config.Settings.
It also implies the following issues :
SONAR-2870 do not rebuild the WAR file when editing sonar.properties
SONAR-2869 allow to use the annotations @Properties/@Property on extensions
Diffstat (limited to 'sonar-maven3-plugin')
-rw-r--r-- | sonar-maven3-plugin/src/main/java/org/sonar/maven3/SonarMojo.java | 11 |
1 files changed, 2 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 f4173290c11..001378c7bb7 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 @@ -22,7 +22,6 @@ package org.sonar.maven3; import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.classic.joran.JoranConfigurator; import ch.qos.logback.core.joran.spi.JoranException; -import org.apache.commons.configuration.*; import org.apache.commons.io.IOUtils; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.metadata.ArtifactMetadataSource; @@ -43,6 +42,7 @@ import org.sonar.api.batch.bootstrap.ProjectReactor; import org.sonar.batch.Batch; import org.sonar.batch.MavenProjectConverter; import org.sonar.batch.bootstrapper.EnvironmentInformation; + import java.io.InputStream; /** @@ -140,7 +140,7 @@ public final class SonarMojo extends AbstractMojo { ProjectDefinition def = MavenProjectConverter.convert(session.getSortedProjects(), project); ProjectReactor reactor = new ProjectReactor(def); - Batch batch = Batch.create(reactor, getInitialConfiguration(), + Batch batch = Batch.create(reactor, null, session, getLog(), lifecycleExecutor, artifactFactory, localRepository, artifactMetadataSource, artifactCollector, dependencyTreeBuilder, projectBuilder, getEnvironmentInformation(), Maven3PluginExecutor.class); @@ -170,11 +170,4 @@ public final class SonarMojo extends AbstractMojo { } } - private Configuration getInitialConfiguration() { - CompositeConfiguration configuration = new CompositeConfiguration(); - configuration.addConfiguration(new SystemConfiguration()); - configuration.addConfiguration(new EnvironmentConfiguration()); - configuration.addConfiguration(new MapConfiguration(project.getModel().getProperties())); - return configuration; - } } |