From: Godin Date: Fri, 3 Dec 2010 14:57:36 +0000 (+0000) Subject: SONAR-2011: Remove dependency on maven-common-artifact-filters from sonar-plugin-api X-Git-Tag: 2.6~422 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=58756ad8e3e3cde1da77120b553bb22fbc0b79fa;p=sonarqube.git SONAR-2011: Remove dependency on maven-common-artifact-filters from sonar-plugin-api --- 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 @@ + + + + org.apache.maven + maven-project + provided + + org.codehaus.sonar sonar-testing-harness 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 @@ sonar-plugin-api ${project.version} + + + + org.apache.maven + maven-project + provided + + org.codehaus.sonar sonar-testing-harness test - \ No newline at end of file + 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 @@ sonar-plugin-api ${project.version} + + + + org.apache.maven + maven-project + provided + + org.codehaus.sonar sonar-testing-harness 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 @@ junit test + + + + org.apache.maven + maven-project + test + 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 @@ + + + + org.apache.maven + maven-project + provided + + org.codehaus.sonar sonar-testing-harness 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 @@ org.codehaus.sonar sonar-squid + org.hibernate hibernate-core @@ -80,6 +81,10 @@ org.hibernate hibernate-entitymanager + + org.hibernate + hibernate-ehcache + geronimo-spec geronimo-spec-jta @@ -96,6 +101,10 @@ commons-dbcp commons-dbcp + + org.apache.maven maven-plugin-api @@ -111,10 +120,7 @@ maven-project provided - - org.apache.maven.shared - maven-common-artifact-filters - + commons-configuration commons-configuration @@ -135,10 +141,6 @@ commons-codec commons-codec - - org.hibernate - hibernate-ehcache - jfree jfreechart @@ -236,4 +238,4 @@ test - \ No newline at end of file + 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 modules = new ArrayList(); @@ -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) {