Author: mkleint
Date: Tue Nov  6 00:56:50 2007
New Revision: 592335

URL: http://svn.apache.org/viewvc?rev=592335&view=rev
Log:
- only add remote repo if defined.
- use additional properties if entered

Modified:
    
maven/sandbox/trunk/archetypeng/archetypeng-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeGenerationConfigurator.java

Modified: 
maven/sandbox/trunk/archetypeng/archetypeng-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeGenerationConfigurator.java
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetypeng-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeGenerationConfigurator.java?rev=592335&r1=592334&r2=592335&view=diff
==============================================================================
--- 
maven/sandbox/trunk/archetypeng/archetypeng-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeGenerationConfigurator.java
 (original)
+++ 
maven/sandbox/trunk/archetypeng/archetypeng-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeGenerationConfigurator.java
 Tue Nov  6 00:56:50 2007
@@ -91,8 +91,11 @@
         {
             throw new ArchetypeNotDefined( "The archetype is not defined" );
         }
-
-        repositories.add( archetypeRegistryManager.createRepository( 
request.getRemoteRepository(), ad.getArtifactId() + "-repo" ) );
+        
+        if ( request.getRemoteRepository() != null ) 
+        { 
+            repositories.add( archetypeRegistryManager.createRepository( 
request.getRemoteRepository(), ad.getArtifactId() + "-repo" ) );
+        }
 
         if ( !archetypeArtifactManager.exists( ad.getGroupId(), 
ad.getArtifactId(), ad.getVersion(), localRepository, repositories ) )
         {
@@ -185,6 +188,8 @@
 
         request.setPackage( archetypeConfiguration.getProperty( 
Constants.PACKAGE ) );
 
+        properties = archetypeConfiguration.getProperties();
+        
         properties.remove( Constants.GROUP_ID );
 
         properties.remove( Constants.ARTIFACT_ID );
@@ -192,7 +197,7 @@
         properties.remove( Constants.VERSION );
 
         properties.remove( Constants.PACKAGE );
-
+        
         request.setProperties( properties );
     }
 }


Reply via email to