continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r170758 - in /maven/continuum/trunk/continuum-core/src: main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java main/resources/META-INF/plexus/components.xml test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
Date Wed, 18 May 2005 14:38:24 GMT
Author: trygvis
Date: Wed May 18 07:38:24 2005
New Revision: 170758

URL: http://svn.apache.org/viewcvs?rev=170758&view=rev
Log:
Fixing CONTINUUM-129: "When adding Maven 2 projects with <modules>, do not add
                       projects with type=pom"
o Added a list of excluded packaging types which will be checked when adding a
  project. It will still look at the modules list for the project, but not add
  the project itself.

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java?rev=170758&r1=170757&r2=170758&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
Wed May 18 07:38:24 2005
@@ -18,6 +18,7 @@
 
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
 
@@ -46,6 +47,9 @@
     /** @requirement */
     private MavenBuilderHelper builderHelper;
 
+    /** @configuration */
+    private List excludedPackagingTypes;
+
     // ----------------------------------------------------------------------
     // ProjectCreator Implementation
     // ----------------------------------------------------------------------
@@ -89,11 +93,14 @@
             throw new ContinuumProjectBuilderException( "Error while building Maven project.",
e );
         }
 
-        MavenTwoProject continuumProject = new MavenTwoProject();
+        if ( !excludedPackagingTypes.contains( mavenProject.getPackaging() ) )
+        {
+            MavenTwoProject continuumProject = new MavenTwoProject();
 
-        builderHelper.mapMavenProjectToContinuumProject( mavenProject, continuumProject );
+            builderHelper.mapMavenProjectToContinuumProject( mavenProject, continuumProject
);
 
-        result.addProject( continuumProject, MavenTwoBuildExecutor.ID );
+            result.addProject( continuumProject, MavenTwoBuildExecutor.ID );
+        }
 
         List modules = mavenProject.getModules();
 

Modified: maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml?rev=170758&r1=170757&r2=170758&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
(original)
+++ maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
Wed May 18 07:38:24 2005
@@ -308,6 +308,11 @@
           <role>org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelper</role>
         </requirement>
       </requirements>
+      <configuration>
+        <excludedPackagingTypes>
+          <packaging implementation="java.lang.String">pom</packaging>
+        </excludedPackagingTypes>
+      </configuration>
     </component>
 
     <!--

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java?rev=170758&r1=170757&r2=170758&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
(original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
Wed May 18 07:38:24 2005
@@ -86,7 +86,7 @@
 
         assertNotNull( result );
 
-        assertEquals( 6, result.getProjects().size() );
+        assertEquals( 5, result.getProjects().size() );
 
         Map projects = new HashMap();
 
@@ -99,7 +99,6 @@
             projects.put( project.getName(), project );
         }
 
-        assertMavenTwoProject( "Continuum Parent Project", projects );
         assertMavenTwoProject( "Continuum Core", projects );
         assertMavenTwoProject( "Continuum Model", projects );
         assertMavenTwoProject( "Continuum Plexus Application", projects );



Mime
View raw message