continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r216291 - in /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven: m1/DefaultMavenOneMetadataHelper.java m2/DefaultMavenBuilderHelper.java
Date Thu, 14 Jul 2005 00:40:16 GMT
Author: jvanzyl
Date: Wed Jul 13 17:40:15 2005
New Revision: 216291

URL: http://svn.apache.org/viewcvs?rev=216291&view=rev
Log:
o populating continuum project with artifact id

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java?rev=216291&r1=216290&r2=216291&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
Wed Jul 13 17:40:15 2005
@@ -72,10 +72,42 @@
         }
 
         // ----------------------------------------------------------------------
-        // Populating the descriptor
+        // groupId
+        // ----------------------------------------------------------------------
+
+        String groupId = getValue( mavenProject, "groupId", null );
+
+        if ( groupId  != null )
+        {
+            throw new MavenOneMetadataHelperException( "Missing 'groupId' element in the
POM." );
+        }
+
+        // ----------------------------------------------------------------------
+        // artifactId
+        // ----------------------------------------------------------------------
+
+        String artifactId = getValue( mavenProject, "artifactId", null );
+
+        if ( groupId  != null )
+        {
+            throw new MavenOneMetadataHelperException( "Missing 'artifactId' element in the
POM." );
+        }
+
+        // ----------------------------------------------------------------------
+        // version
+        // ----------------------------------------------------------------------
+
+        String version = getValue( mavenProject, "currentVersion", project.getVersion() );
+
+        if ( StringUtils.isEmpty( version ) )
+        {
+            throw new MavenOneMetadataHelperException( "Missing 'version' element in the
POM." );
+        }
+
+        // ----------------------------------------------------------------------
+        // name
         // ----------------------------------------------------------------------
 
-        // Name
         String name = getValue( mavenProject, "name", project.getName() );
 
         if ( StringUtils.isEmpty( name ) )
@@ -83,7 +115,10 @@
             throw new MavenOneMetadataHelperException( "Missing 'name' element in POM." );
         }
 
-        // Scm
+        // ----------------------------------------------------------------------
+        // scm
+        // ----------------------------------------------------------------------
+
         Xpp3Dom repository = mavenProject.getChild( "repository" );
 
         String scmConnection;
@@ -111,7 +146,10 @@
             }
         }
 
-        // Nag email address
+        // ----------------------------------------------------------------------
+        // notifiers
+        // ----------------------------------------------------------------------
+
         Xpp3Dom build = mavenProject.getChild( "build" );
 
         List notifiers = null;
@@ -157,7 +195,6 @@
 
                 notifier.setConfiguration( props );
             }
-
         }
 
         if ( notifiers == null && notifier.getConfiguration().isEmpty() )
@@ -174,14 +211,6 @@
             notifiers.add( notifier );
         }
 
-        // Version
-        String version = getValue( mavenProject, "currentVersion", project.getVersion() );
-
-        if ( StringUtils.isEmpty( version ) )
-        {
-            throw new MavenOneMetadataHelperException( "Missing 'version' element in the
POM." );
-        }
-
         // Goals
         if ( StringUtils.isEmpty( project.getGoals() ) )
         {
@@ -192,13 +221,17 @@
         // Make the project
         // ----------------------------------------------------------------------
 
+        project.setGroupId( groupId );
+
+        project.setArtifactId( artifactId );
+
+        project.setVersion( version );
+
         project.setName( name );
 
         project.setScmUrl( scmConnection );
 
         project.setNotifiers( notifiers );
-
-        project.setVersion( version );
     }
 
     // ----------------------------------------------------------------------

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java?rev=216291&r1=216290&r2=216291&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
Wed Jul 13 17:40:15 2005
@@ -101,7 +101,7 @@
         }
 
         // ----------------------------------------------------------------------
-        // Group
+        // GroupId
         // ----------------------------------------------------------------------
 
         if ( mavenProject.getGroupId() != null )
@@ -110,6 +110,15 @@
         }
 
         // ----------------------------------------------------------------------
+        // artifactId
+        // ----------------------------------------------------------------------
+
+        if ( mavenProject.getArtifactId() != null )
+        {
+           continuumProject.setArtifactId( mavenProject.getArtifactId() );
+        }
+
+        // ----------------------------------------------------------------------
         // Project Url
         // ----------------------------------------------------------------------
 
@@ -181,6 +190,8 @@
         // ----------------------------------------------------------------------
         // Validate the MavenProject using some Continuum rules
         // ----------------------------------------------------------------------
+
+
 
         // Nag email address
         CiManagement ciManagement = project.getCiManagement();



Mime
View raw message