]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2011: Remove dependency on maven-common-artifact-filters from sonar-plugin-api
authorGodin <mandrikov@gmail.com>
Fri, 3 Dec 2010 14:57:36 +0000 (14:57 +0000)
committerGodin <mandrikov@gmail.com>
Fri, 3 Dec 2010 14:57:36 +0000 (14:57 +0000)
plugins/sonar-checkstyle-plugin/pom.xml
plugins/sonar-clover-plugin/pom.xml
plugins/sonar-cobertura-plugin/pom.xml
plugins/sonar-dbcleaner-plugin/pom.xml
plugins/sonar-pmd-plugin/pom.xml
sonar-plugin-api/pom.xml
sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java

index 0d4ac871fe1d64eb8a94ebbee5041029b520bf9b..26cb84c0fb4c185c88e13e5eaca5c8e9e2788545 100644 (file)
         </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>
index d33033855dc3ea577ae4cb1dce71645081bec2b6..6a360c06525fd5f9beae8da05ca15da86a81eccd 100644 (file)
       <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>
index a3c753f50c2e28ff14d2e12d291f7128aa473aff..d25aac7a4a7181413873f879f950577161416d42 100644 (file)
       <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>
index 145d5a33b4907addb4ebdbb7179ee99ad931bf6c..8d91c8684e9c9d85128349446699a41cdcb16e60 100644 (file)
       <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>
index d6cb1ccc27d387cff2e5789e0ebfe03df007f08a..792b9e69b87650138f4617153d807a8f4e0ece14 100644 (file)
         </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>
index eedc11ae2d9bb02eddae42a3b97dfbaf90413a55..dcf05f40727534578308b6fad9b2e86f0c44f3fc 100644 (file)
@@ -64,6 +64,7 @@
       <groupId>org.codehaus.sonar</groupId>
       <artifactId>sonar-squid</artifactId>
     </dependency>
+
     <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-core</artifactId>
       <groupId>org.hibernate</groupId>
       <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>
       <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>
       <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>
       <groupId>commons-codec</groupId>
       <artifactId>commons-codec</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.hibernate</groupId>
-      <artifactId>hibernate-ehcache</artifactId>
-    </dependency>
     <dependency>
       <groupId>jfree</groupId>
       <artifactId>jfreechart</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>
index 45aa0cbfcf3a1f3d6d575c92817ecab819996c9f..d4d37e95faee2926ea6415deca51b23c910ad667 100644 (file)
@@ -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) {