diff options
author | Godin <mandrikov@gmail.com> | 2010-12-03 14:57:36 +0000 |
---|---|---|
committer | Godin <mandrikov@gmail.com> | 2010-12-03 14:57:36 +0000 |
commit | 58756ad8e3e3cde1da77120b553bb22fbc0b79fa (patch) | |
tree | 363b80b41d9fb6fb5d3b8f929b8d62810a2e9197 | |
parent | 555287b5a0fd21e19f26afa7b9f683a244c39dad (diff) | |
download | sonarqube-58756ad8e3e3cde1da77120b553bb22fbc0b79fa.tar.gz sonarqube-58756ad8e3e3cde1da77120b553bb22fbc0b79fa.zip |
SONAR-2011: Remove dependency on maven-common-artifact-filters from sonar-plugin-api
-rw-r--r-- | plugins/sonar-checkstyle-plugin/pom.xml | 10 | ||||
-rw-r--r-- | plugins/sonar-clover-plugin/pom.xml | 12 | ||||
-rw-r--r-- | plugins/sonar-cobertura-plugin/pom.xml | 10 | ||||
-rw-r--r-- | plugins/sonar-dbcleaner-plugin/pom.xml | 11 | ||||
-rw-r--r-- | plugins/sonar-pmd-plugin/pom.xml | 10 | ||||
-rw-r--r-- | sonar-plugin-api/pom.xml | 20 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java | 13 |
7 files changed, 71 insertions, 15 deletions
diff --git a/plugins/sonar-checkstyle-plugin/pom.xml b/plugins/sonar-checkstyle-plugin/pom.xml index 0d4ac871fe1..26cb84c0fb4 100644 --- a/plugins/sonar-checkstyle-plugin/pom.xml +++ b/plugins/sonar-checkstyle-plugin/pom.xml @@ -45,6 +45,16 @@ </exclusion> </exclusions> </dependency> + + <!-- TODO http://jira.codehaus.org/browse/SONAR-2011 + We need following dependency, otherwise we will receive compilation error + --> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-project</artifactId> + <scope>provided</scope> + </dependency> + <dependency> <groupId>org.codehaus.sonar</groupId> <artifactId>sonar-testing-harness</artifactId> diff --git a/plugins/sonar-clover-plugin/pom.xml b/plugins/sonar-clover-plugin/pom.xml index d33033855dc..6a360c06525 100644 --- a/plugins/sonar-clover-plugin/pom.xml +++ b/plugins/sonar-clover-plugin/pom.xml @@ -52,10 +52,20 @@ <artifactId>sonar-plugin-api</artifactId> <version>${project.version}</version> </dependency> + + <!-- TODO http://jira.codehaus.org/browse/SONAR-2011 + We need following dependency, otherwise we will receive compilation error + --> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-project</artifactId> + <scope>provided</scope> + </dependency> + <dependency> <groupId>org.codehaus.sonar</groupId> <artifactId>sonar-testing-harness</artifactId> <scope>test</scope> </dependency> </dependencies> -</project>
\ No newline at end of file +</project> diff --git a/plugins/sonar-cobertura-plugin/pom.xml b/plugins/sonar-cobertura-plugin/pom.xml index a3c753f50c2..d25aac7a4a7 100644 --- a/plugins/sonar-cobertura-plugin/pom.xml +++ b/plugins/sonar-cobertura-plugin/pom.xml @@ -18,6 +18,16 @@ <artifactId>sonar-plugin-api</artifactId> <version>${project.version}</version> </dependency> + + <!-- TODO http://jira.codehaus.org/browse/SONAR-2011 + We need following dependency, otherwise we will receive compilation error + --> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-project</artifactId> + <scope>provided</scope> + </dependency> + <dependency> <groupId>org.codehaus.sonar</groupId> <artifactId>sonar-testing-harness</artifactId> diff --git a/plugins/sonar-dbcleaner-plugin/pom.xml b/plugins/sonar-dbcleaner-plugin/pom.xml index 145d5a33b49..8d91c8684e9 100644 --- a/plugins/sonar-dbcleaner-plugin/pom.xml +++ b/plugins/sonar-dbcleaner-plugin/pom.xml @@ -36,6 +36,17 @@ <artifactId>junit</artifactId> <scope>test</scope> </dependency> + + <!-- TODO http://jira.codehaus.org/browse/SONAR-2011 + We need following dependency, otherwise we will receive + java.lang.NoClassDefFoundError: org/apache/maven/project/MavenProject + during call mock(org.sonar.api.resources.Project.class) + --> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-project</artifactId> + <scope>test</scope> + </dependency> </dependencies> <build> diff --git a/plugins/sonar-pmd-plugin/pom.xml b/plugins/sonar-pmd-plugin/pom.xml index d6cb1ccc27d..792b9e69b87 100644 --- a/plugins/sonar-pmd-plugin/pom.xml +++ b/plugins/sonar-pmd-plugin/pom.xml @@ -44,6 +44,16 @@ </exclusion> </exclusions> </dependency> + + <!-- TODO http://jira.codehaus.org/browse/SONAR-2011 + We need following dependency, otherwise we will receive compilation error + --> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-project</artifactId> + <scope>provided</scope> + </dependency> + <dependency> <groupId>org.codehaus.sonar</groupId> <artifactId>sonar-testing-harness</artifactId> diff --git a/sonar-plugin-api/pom.xml b/sonar-plugin-api/pom.xml index eedc11ae2d9..dcf05f40727 100644 --- a/sonar-plugin-api/pom.xml +++ b/sonar-plugin-api/pom.xml @@ -64,6 +64,7 @@ <groupId>org.codehaus.sonar</groupId> <artifactId>sonar-squid</artifactId> </dependency> + <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> @@ -81,6 +82,10 @@ <artifactId>hibernate-entitymanager</artifactId> </dependency> <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-ehcache</artifactId> + </dependency> + <dependency> <groupId>geronimo-spec</groupId> <artifactId>geronimo-spec-jta</artifactId> </dependency> @@ -96,6 +101,10 @@ <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> </dependency> + + <!-- TODO remove dependencies on Maven + but for now they should be defined with scope provided + --> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> @@ -111,10 +120,7 @@ <artifactId>maven-project</artifactId> <scope>provided</scope> </dependency> - <dependency> - <groupId>org.apache.maven.shared</groupId> - <artifactId>maven-common-artifact-filters</artifactId> - </dependency> + <dependency> <groupId>commons-configuration</groupId> <artifactId>commons-configuration</artifactId> @@ -136,10 +142,6 @@ <artifactId>commons-codec</artifactId> </dependency> <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-ehcache</artifactId> - </dependency> - <dependency> <groupId>jfree</groupId> <artifactId>jfreechart</artifactId> </dependency> @@ -236,4 +238,4 @@ <scope>test</scope> </dependency> </dependencies> -</project>
\ No newline at end of file +</project> diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java index 45aa0cbfcf3..d4d37e95fae 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java @@ -31,7 +31,7 @@ import java.util.List; /** * A class that manipulates Projects in the Sonar way, i.e. mixing MavenProjects with the way it should be analyzed - * + * * @since 1.10 */ public class Project extends Resource { @@ -72,7 +72,6 @@ public class Project extends Resource { @Deprecated public static final String PARAM_REUSE_RULES_CONFIG = "sonar.reuseExistingRulesConfiguration"; - /** * Enumerates the type of possible analysis */ @@ -103,7 +102,7 @@ public class Project extends Resource { private String[] exclusionPatterns; private String analysisVersion; private boolean latestAnalysis; - + // modules tree private Project parent; private List<Project> modules = new ArrayList<Project>(); @@ -132,6 +131,9 @@ public class Project extends Resource { return this; } + /** + * For internal use only. + */ public final Project setPom(MavenProject pom) { this.pom = pom; return this; @@ -203,6 +205,7 @@ public class Project extends Resource { /** * whether it's the latest analysis done on this project (displayed in sonar dashboard) or an analysis on a past revision. + * * @since 2.0 */ public boolean isLatestAnalysis() { @@ -312,7 +315,7 @@ public class Project extends Resource { * For internal use only. */ public void removeFromParent() { - if (parent!=null) { + if (parent != null) { parent.modules.remove(this); } } @@ -385,7 +388,7 @@ public class Project extends Resource { /** * Sets the configuration - * + * * @return the current object */ public final Project setConfiguration(Configuration configuration) { |