continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r321187 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
Date Fri, 14 Oct 2005 19:08:55 GMT
Author: evenisse
Date: Fri Oct 14 12:08:53 2005
New Revision: 321187

URL: http://svn.apache.org/viewcvs?rev=321187&view=rev
Log:
Fix groupId/artifactId initialization

Modified:
    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/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=321187&r1=321186&r2=321187&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
Fri Oct 14 12:08:53 2005
@@ -101,25 +101,33 @@
         // GroupId
         // ----------------------------------------------------------------------
 
-        if ( StringUtils.isEmpty( mavenProject.getGroupId() ) )
+        if ( !StringUtils.isEmpty( mavenProject.getGroupId() ) )
         {
             continuumProject.setGroupId( mavenProject.getGroupId() );
         }
+        else
+        {
+            throw new MavenBuilderHelperException( "Missing 'groupId' element in the POM."
);
+        }
 
         // ----------------------------------------------------------------------
         // artifactId
         // ----------------------------------------------------------------------
 
-        if ( StringUtils.isEmpty( mavenProject.getArtifactId() ) )
+        if ( !StringUtils.isEmpty( mavenProject.getArtifactId() ) )
         {
             continuumProject.setArtifactId( mavenProject.getArtifactId() );
         }
+        else
+        {
+            throw new MavenBuilderHelperException( "Missing 'artifactId' element in the POM."
);
+        }
 
         // ----------------------------------------------------------------------
         // Project Url
         // ----------------------------------------------------------------------
 
-        if ( StringUtils.isEmpty( mavenProject.getUrl() ) )
+        if ( !StringUtils.isEmpty( mavenProject.getUrl() ) )
         {
             continuumProject.setUrl( mavenProject.getUrl() );
         }



Mime
View raw message