maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r390983 - /maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/DefaultArchetype.java
Date Mon, 03 Apr 2006 08:28:03 GMT
Author: brett
Date: Mon Apr  3 01:28:01 2006
New Revision: 390983

URL: http://svn.apache.org/viewcvs?rev=390983&view=rev
Log:
group ID and version are required when generating a new project

Modified:
    maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/DefaultArchetype.java

Modified: maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/DefaultArchetype.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/DefaultArchetype.java?rev=390983&r1=390982&r2=390983&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/DefaultArchetype.java
(original)
+++ maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/DefaultArchetype.java
Mon Apr  3 01:28:01 2006
@@ -237,6 +237,21 @@
             pomFile = new File( outputDirectoryFile, ARCHETYPE_POM );
         }
 
+        if ( creating )
+        {
+            if ( !parameters.containsKey( "groupId" ) )
+            {
+                throw new ArchetypeTemplateProcessingException(
+                    "Group ID must be specified when creating a new project from an archetype."
);
+            }
+
+            if ( !parameters.containsKey( "version" ) )
+            {
+                throw new ArchetypeTemplateProcessingException(
+                    "Version must be specified when creating a new project from an archetype."
);
+            }
+        }
+
         String outputDirectory = outputDirectoryFile.getAbsolutePath();
 
         String packageName = (String) parameters.get( "package" );



Mime
View raw message