maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r387999 - in /maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype: Archetype.java DefaultArchetype.java
Date Thu, 23 Mar 2006 01:55:41 GMT
Author: brett
Date: Wed Mar 22 17:55:39 2006
New Revision: 387999

URL: http://svn.apache.org/viewcvs?rev=387999&view=rev
Log:
use new descriptor

Modified:
    maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/Archetype.java
    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/Archetype.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/Archetype.java?rev=387999&r1=387998&r2=387999&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/Archetype.java
(original)
+++ maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/Archetype.java
Wed Mar 22 17:55:39 2006
@@ -29,7 +29,9 @@
 {
     String ROLE = Archetype.class.getName();
 
-    String ARCHETYPE_DESCRIPTOR = "META-INF/archetype.xml";
+    String ARCHETYPE_DESCRIPTOR = "META-INF/maven/archetype.xml";
+
+    String ARCHETYPE_OLD_DESCRIPTOR = "META-INF/archetype.xml";
 
     String ARCHETYPE_RESOURCES = "archetype-resources";
 

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=387999&r1=387998&r2=387999&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
Wed Mar 22 17:55:39 2006
@@ -166,8 +166,13 @@
 
             if ( is == null )
             {
-                throw new ArchetypeDescriptorException(
-                    "The " + ARCHETYPE_DESCRIPTOR + " descriptor cannot be found." );
+                is = getStream( ARCHETYPE_OLD_DESCRIPTOR, archetypeJarLoader );
+
+                if ( is == null )
+                {
+                    throw new ArchetypeDescriptorException(
+                        "The " + ARCHETYPE_DESCRIPTOR + " descriptor cannot be found." );
+                }
             }
 
             descriptor = builder.build( new InputStreamReader( is ) );



Mime
View raw message