maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r582431 - in /maven/sandbox/trunk/archetypeng: archetypeng-common/src/main/java/org/apache/maven/archetype/ archetypeng-common/src/main/java/org/apache/maven/archetype/creator/ archetypeng-common/src/main/java/org/apache/maven/archetype/gen...
Date Sat, 06 Oct 2007 01:54:43 GMT
Author: jvanzyl
Date: Fri Oct  5 18:54:42 2007
New Revision: 582431

URL: http://svn.apache.org/viewvc?rev=582431&view=rev
Log:
o creating the request/result for archetype creation from project and adding methods to Archetyper
component, next is
  to use these in the mojos and document embedding.

Modified:
    maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeCreationRequest.java
    maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeCreationResult.java
    maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeGenerationRequest.java
    maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/Archetyper.java
    maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/DefaultArchetyper.java
    maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/creator/ArchetypeCreator.java
    maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java
    maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/generator/ArchetypeGenerator.java
    maven/sandbox/trunk/archetypeng/archetypeng-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java
    maven/sandbox/trunk/archetypeng/archetypeng-plugin/src/main/java/org/apache/maven/archetype/mojos/updateLocalCatalogMojo.java

Modified: maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeCreationRequest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeCreationRequest.java?rev=582431&r1=582430&r2=582431&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeCreationRequest.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeCreationRequest.java
Fri Oct  5 18:54:42 2007
@@ -1,13 +1,168 @@
 package org.apache.maven.archetype;
 
 import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.project.MavenProject;
 
+import java.io.File;
 import java.util.List;
 
 /** @author Jason van Zyl */
 public class ArchetypeCreationRequest
 {
     private ArtifactRepository localRepository;
-
     private List remoteRepositories;
+    private MavenProject project;
+    private File propertyFile;
+    private List languages;
+    private List filtereds;
+    private String defaultEncoding;
+    private boolean ignoreReplica;
+    private boolean preserveCData;
+    private boolean keepParent;
+    private boolean partialArchetype;
+    private File archetypeRegistryFile;
+
+    public ArtifactRepository getLocalRepository()
+    {
+        return localRepository;
+    }
+
+    public ArchetypeCreationRequest setLocalRepository( ArtifactRepository localRepository
)
+    {
+        this.localRepository = localRepository;
+
+        return this;
+    }
+
+    public List getRemoteRepositories()
+    {
+        return remoteRepositories;
+    }
+
+    public ArchetypeCreationRequest setRemoteRepositories( List remoteRepositories )
+    {
+        this.remoteRepositories = remoteRepositories;
+
+        return this;
+    }
+
+    public MavenProject getProject()
+    {
+        return project;
+    }
+
+    public ArchetypeCreationRequest setProject( MavenProject project )
+    {
+        this.project = project;
+
+        return this;
+    }
+
+    public File getPropertyFile()
+    {
+        return propertyFile;
+    }
+
+    public ArchetypeCreationRequest setPropertyFile( File propertyFile )
+    {
+        this.propertyFile = propertyFile;
+
+        return this;
+    }
+
+    public List getLanguages()
+    {
+        return languages;
+    }
+
+    public ArchetypeCreationRequest setLanguages( List languages )
+    {
+        this.languages = languages;
+
+        return this;
+    }
+
+    public List getFiltereds()
+    {
+        return filtereds;
+    }
+
+    public ArchetypeCreationRequest setFiltereds( List filtereds )
+    {
+        this.filtereds = filtereds;
+
+        return this;
+    }
+
+    public String getDefaultEncoding()
+    {
+        return defaultEncoding;
+    }
+
+    public ArchetypeCreationRequest setDefaultEncoding( String defaultEncoding )
+    {
+        this.defaultEncoding = defaultEncoding;
+
+        return this;
+    }
+
+    public boolean isIgnoreReplica()
+    {
+        return ignoreReplica;
+    }
+
+    public ArchetypeCreationRequest setIgnoreReplica( boolean ignoreReplica )
+    {
+        this.ignoreReplica = ignoreReplica;
+
+        return this;
+    }
+
+    public boolean isPreserveCData()
+    {
+        return preserveCData;
+    }
+
+    public ArchetypeCreationRequest setPreserveCData( boolean preserveCData )
+    {
+        this.preserveCData = preserveCData;
+
+        return this;
+    }
+
+    public boolean isKeepParent()
+    {
+        return keepParent;
+    }
+
+    public ArchetypeCreationRequest setKeepParent( boolean keepParent )
+    {
+        this.keepParent = keepParent;
+
+        return this;
+    }
+
+    public boolean isPartialArchetype()
+    {
+        return partialArchetype;
+    }
+
+    public ArchetypeCreationRequest setPartialArchetype( boolean partialArchetype )
+    {
+        this.partialArchetype = partialArchetype;
+
+        return this;
+    }
+
+    public File getArchetypeRegistryFile()
+    {
+        return archetypeRegistryFile;
+    }
+
+    public ArchetypeCreationRequest setArchetypeRegistryFile( File archetypeRegistryFile
)
+    {
+        this.archetypeRegistryFile = archetypeRegistryFile;
+
+        return this;
+    }
 }

Modified: maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeCreationResult.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeCreationResult.java?rev=582431&r1=582430&r2=582431&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeCreationResult.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeCreationResult.java
Fri Oct  5 18:54:42 2007
@@ -7,7 +7,15 @@
 /** @author Jason van Zyl */
 public class ArchetypeCreationResult
 {
-    private ArtifactRepository localRepository;
+    private Exception cause;
 
-    private List remoteRepositories;
-}  
+    public Exception getCause()
+    {
+        return cause;
+    }
+
+    public void setCause( Exception cause )
+    {
+        this.cause = cause;
+    }
+}

Modified: maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeGenerationRequest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeGenerationRequest.java?rev=582431&r1=582430&r2=582431&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeGenerationRequest.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeGenerationRequest.java
Fri Oct  5 18:54:42 2007
@@ -39,9 +39,11 @@
         return archetypeGroupId;
     }
 
-    public void setArchetypeGroupId( String archetypeGroupId )
+    public ArchetypeGenerationRequest setArchetypeGroupId( String archetypeGroupId )
     {
         this.archetypeGroupId = archetypeGroupId;
+
+        return this;
     }
 
     public String getArchetypeArtifactId()
@@ -49,9 +51,11 @@
         return archetypeArtifactId;
     }
 
-    public void setArchetypeArtifactId( String archetypeArtifactId )
+    public ArchetypeGenerationRequest setArchetypeArtifactId( String archetypeArtifactId
)
     {
         this.archetypeArtifactId = archetypeArtifactId;
+
+        return this;
     }
 
     public String getArchetypeVersion()
@@ -59,9 +63,11 @@
         return archetypeVersion;
     }
 
-    public void setArchetypeVersion( String archetypeVersion )
+    public ArchetypeGenerationRequest setArchetypeVersion( String archetypeVersion )
     {
         this.archetypeVersion = archetypeVersion;
+
+        return this;
     }
 
     public String getArchetypeGoals()
@@ -69,9 +75,11 @@
         return archetypeGoals;
     }
 
-    public void setArchetypeGoals( String archetypeGoals )
+    public ArchetypeGenerationRequest setArchetypeGoals( String archetypeGoals )
     {
         this.archetypeGoals = archetypeGoals;
+
+        return this;
     }
 
     public String getArchetypeName()
@@ -79,9 +87,11 @@
         return archetypeName;
     }
 
-    public void setArchetypeName( String archetypeName )
+    public ArchetypeGenerationRequest setArchetypeName( String archetypeName )
     {
         this.archetypeName = archetypeName;
+
+        return this;
     }
 
     public String getArchetypeRepository()
@@ -89,9 +99,11 @@
         return archetypeRepository;
     }
 
-    public void setArchetypeRepository( String archetypeRepository )
+    public ArchetypeGenerationRequest setArchetypeRepository( String archetypeRepository
)
     {
         this.archetypeRepository = archetypeRepository;
+
+        return this;
     }
 
     public String getArtifactId()
@@ -99,9 +111,11 @@
         return artifactId;
     }
 
-    public void setArtifactId( String artifactId )
+    public ArchetypeGenerationRequest setArtifactId( String artifactId )
     {
         this.artifactId = artifactId;
+
+        return this;
     }
 
     public String getGroupId()
@@ -119,9 +133,11 @@
         return version;
     }
 
-    public void setVersion( String version )
+    public ArchetypeGenerationRequest setVersion( String version )
     {
         this.version = version;
+
+        return this;
     }
 
     public String getPackage()
@@ -129,9 +145,11 @@
         return packageName;
     }
 
-    public void setPackage( String packageName )
+    public ArchetypeGenerationRequest setPackage( String packageName )
     {
         this.packageName = packageName;
+
+        return this;
     }
 
     public Properties getAdditionalProperties()
@@ -139,9 +157,11 @@
         return additionalProperties;
     }
 
-    public void setAdditionalProperties( Properties additionalProperties )
+    public ArchetypeGenerationRequest setAdditionalProperties( Properties additionalProperties
)
     {
         this.additionalProperties = additionalProperties;
+
+        return this;
     }
 
     public ArtifactRepository getLocalRepository()
@@ -149,9 +169,11 @@
         return localRepository;
     }
 
-    public void setLocalRepository( ArtifactRepository localRepository )
+    public ArchetypeGenerationRequest setLocalRepository( ArtifactRepository localRepository
)
     {
         this.localRepository = localRepository;
+
+        return this;
     }
 
     public String getOutputDirectory()
@@ -159,8 +181,10 @@
         return outputDirectory;
     }
 
-    public void setOutputDirectory( String outputDirectory )
+    public ArchetypeGenerationRequest setOutputDirectory( String outputDirectory )
     {
         this.outputDirectory = outputDirectory;
+
+        return this;
     }
 }

Modified: maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/Archetyper.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/Archetyper.java?rev=582431&r1=582430&r2=582431&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/Archetyper.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/Archetyper.java
Fri Oct  5 18:54:42 2007
@@ -1,5 +1,7 @@
 package org.apache.maven.archetype;
 
+import java.util.Collection;
+
 /** @author Jason van Zyl */
 public interface Archetyper
 {
@@ -8,4 +10,6 @@
     ArchetypeCreationResult createArchetypeFromProject( ArchetypeCreationRequest request
);
 
     ArchetypeGenerationResult generateProjectFromArchetype( ArchetypeGenerationRequest request
);
+
+    Collection getArchetypeDataSources();
 }

Modified: maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/DefaultArchetyper.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/DefaultArchetyper.java?rev=582431&r1=582430&r2=582431&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/DefaultArchetyper.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/DefaultArchetyper.java
Fri Oct  5 18:54:42 2007
@@ -2,6 +2,10 @@
 
 import org.apache.maven.archetype.creator.ArchetypeCreator;
 import org.apache.maven.archetype.generator.ArchetypeGenerator;
+import org.apache.maven.archetype.source.ArchetypeDataSource;
+
+import java.util.Collection;
+import java.util.Map;
 
 /**
  * @plexus.component
@@ -16,12 +20,14 @@
     /** @plexus.requirement */
     private ArchetypeGenerator generator;
 
+    /** @plexus.requirement role="org.apache.maven.archetype.source.ArchetypeDataSource"
*/
+    private Map archetypeSources;
+
     public ArchetypeCreationResult createArchetypeFromProject( ArchetypeCreationRequest request
)
     {
         ArchetypeCreationResult result = new ArchetypeCreationResult();
 
-        // This should take information from the request and that's it.
-        //creator.createArchetype( request, result );
+        creator.createArchetype( request, result );
 
         return result;
     }
@@ -30,9 +36,18 @@
     {
         ArchetypeGenerationResult result = new ArchetypeGenerationResult();
 
-        // This should take information from the request and that's it.
         generator.generateArchetype( request, result );
 
         return result;
+    }
+
+    public Collection getArchetypeDataSources()
+    {
+        return archetypeSources.values();
+    }
+
+    public ArchetypeDataSource getArchetypeDataSource( String roleHint )
+    {
+        return (ArchetypeDataSource) archetypeSources.get(  roleHint );
     }
 }

Modified: maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/creator/ArchetypeCreator.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/creator/ArchetypeCreator.java?rev=582431&r1=582430&r2=582431&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/creator/ArchetypeCreator.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/creator/ArchetypeCreator.java
Fri Oct  5 18:54:42 2007
@@ -19,6 +19,8 @@
 
 package org.apache.maven.archetype.creator;
 
+import org.apache.maven.archetype.ArchetypeCreationRequest;
+import org.apache.maven.archetype.ArchetypeCreationResult;
 import org.apache.maven.archetype.exception.ArchetypeNotConfigured;
 import org.apache.maven.archetype.exception.ArchetypeNotDefined;
 import org.apache.maven.archetype.exception.TemplateCreationException;
@@ -34,23 +36,20 @@
 {
     String ROLE = ArchetypeCreator.class.getName();
 
-    void createArchetype(
-        MavenProject project,
-        File propertyFile,
-        List languages,
-        List filtereds,
-        String defaultEncoding,
-        boolean ignoreReplica,
-        boolean preserveCData,
-        boolean keepParent,
-        boolean partialArchetype,
-        File archetypeRegistryFile,
-        ArtifactRepository localRepository
+    void createArchetype( ArchetypeCreationRequest request,
+                          ArchetypeCreationResult result );
+
+    void createArchetype( MavenProject project,
+                          File propertyFile,
+                          List languages,
+                          List filtereds,
+                          String defaultEncoding,
+                          boolean ignoreReplica,
+                          boolean preserveCData,
+                          boolean keepParent,
+                          boolean partialArchetype,
+                          File archetypeRegistryFile,
+                          ArtifactRepository localRepository
     )
-        throws
-        IOException,
-        ArchetypeNotDefined,
-        ArchetypeNotConfigured,
-        TemplateCreationException,
-        XmlPullParserException;
+        throws IOException, ArchetypeNotDefined, ArchetypeNotConfigured, TemplateCreationException,
XmlPullParserException;
 }

Modified: maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java?rev=582431&r1=582430&r2=582431&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java
Fri Oct  5 18:54:42 2007
@@ -21,6 +21,8 @@
 
 import org.apache.commons.collections.BidiMap;
 import org.apache.commons.collections.bidimap.DualTreeBidiMap;
+import org.apache.maven.archetype.ArchetypeCreationRequest;
+import org.apache.maven.archetype.ArchetypeCreationResult;
 import org.apache.maven.archetype.common.ArchetypeConfiguration;
 import org.apache.maven.archetype.common.ArchetypeDefinition;
 import org.apache.maven.archetype.common.ArchetypeFactory;
@@ -48,7 +50,6 @@
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.Extension;
 import org.apache.maven.model.Model;
-import org.apache.maven.model.Parent;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.Profile;
 import org.apache.maven.project.MavenProject;
@@ -98,6 +99,45 @@
 
     /** @plexus.requirement */
     private MavenProjectBuilder projectBuilder;
+
+    public void createArchetype( ArchetypeCreationRequest request,
+                                 ArchetypeCreationResult result )
+    {
+        try
+        {
+            createArchetype( request.getProject(),
+                request.getPropertyFile(),
+                request.getLanguages(),
+                request.getFiltereds(),
+                request.getDefaultEncoding(),
+                request.isIgnoreReplica(),
+                request.isPreserveCData(),
+                request.isKeepParent(),
+                request.isPartialArchetype(),
+                request.getArchetypeRegistryFile(),
+                request.getLocalRepository() );
+        }
+        catch ( IOException e )
+        {
+            result.setCause( e );
+        }
+        catch ( ArchetypeNotDefined e )
+        {
+            result.setCause( e );
+        }
+        catch ( ArchetypeNotConfigured e )
+        {
+            result.setCause( e );
+        }
+        catch ( TemplateCreationException e )
+        {
+            result.setCause( e );
+        }
+        catch ( XmlPullParserException e )
+        {
+            result.setCause( e );
+        }
+    }
 
     public void createArchetype(
         MavenProject project,

Modified: maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/generator/ArchetypeGenerator.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/generator/ArchetypeGenerator.java?rev=582431&r1=582430&r2=582431&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/generator/ArchetypeGenerator.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/generator/ArchetypeGenerator.java
Fri Oct  5 18:54:42 2007
@@ -43,9 +43,8 @@
 {
     String ROLE = ArchetypeGenerator.class.getName();
 
-    public void generateArchetype( ArchetypeGenerationRequest request,
-                                   ArchetypeGenerationResult result
-    );
+    void generateArchetype( ArchetypeGenerationRequest request,
+                            ArchetypeGenerationResult result );
 
     void generateArchetype( File propertyFile,
                             ArtifactRepository localRepository,

Modified: maven/sandbox/trunk/archetypeng/archetypeng-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetypeng-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java?rev=582431&r1=582430&r2=582431&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetypeng-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetypeng-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java
Fri Oct  5 18:54:42 2007
@@ -163,31 +163,15 @@
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
-        // This is what we need here:
-        //
-        // - determine what archetype to use
-        // - configure it
-        // - populate the request
-        //
-        // then:
-        //
-        // result = archetype.generateProjectFromArchteype( request );
-        //
-        // look at the result and respond accordingly.
-
-        ArchetypeGenerationRequest request = new ArchetypeGenerationRequest();
-        request.setArchetypeGroupId( archetypeGroupId );
-        request.setArchetypeArtifactId( archetypeArtifactId );
-        request.setArchetypeVersion( archetypeVersion );
-        request.setOutputDirectory( basedir.getAbsolutePath() );
-        request.setLocalRepository( localRepository );
+        ArchetypeGenerationRequest request = new ArchetypeGenerationRequest()
+            .setArchetypeGroupId( archetypeGroupId )
+            .setArchetypeArtifactId( archetypeArtifactId )
+            .setArchetypeVersion( archetypeVersion )
+            .setOutputDirectory( basedir.getAbsolutePath() )
+            .setLocalRepository( localRepository );
 
         try
         {
-            // This is not really necessary as we will use the central repository or the
repository that
-            // is specified with the archetype. There is no point in searching N repositories
when we
-            // know exactly where the archetype is.
-
             List repositories =
                 archetypeRegistryManager.getRepositories(
                     pomRemoteRepositories,
@@ -202,19 +186,6 @@
                 archetypeRegistryFile,
                 repositories
             );
-//            Old way to call components
-//            selector.selectArchetype(
-//                archetypeGroupId,
-//                archetypeArtifactId,
-//                archetypeVersion,
-//                settings.getInteractiveMode(),
-//                propertyFile,
-//                archetypeRegistryFile,
-//                localRepository,
-//                repositories
-//            );
-
-            // Create the request here for the archetyper and use that instead of the configurator
directly here.
 
             // Only interactiveMode, system.properties (configuration properties) and repositories
are needed outside the request.
             configurator.configureArchetype(
@@ -223,22 +194,8 @@
                 System.getProperties(),
                 repositories
             );
-//            Old way to call components
-//            configurator.configureArchetype(
-//                settings.getInteractiveMode(),
-//                propertyFile,
-//                System.getProperties(),
-//                localRepository,
-//                repositories
-//            );
-
-            // At this point, the archetype should have been downloaded by the configurator,
-            // so the repositories are not needed in the request
 
             ArchetypeGenerationResult result = archetyper.generateProjectFromArchetype( request
);
-
-            // Old way to call the components
-            //generator.generateArchetype( propertyFile, localRepository, repositories, basedir.getAbsolutePath()
);
         }
         catch ( Exception ex )
         {
@@ -266,8 +223,6 @@
         {
             invokePostArchetypeGenerationGoals( postArchetypeGenerationGoals, artifactId
);
         }
-
-//        FileUtils.fileDelete( propertyFile.getAbsolutePath() );
     }
 
     private void invokePostArchetypeGenerationGoals( String goals, String artifactId )

Modified: maven/sandbox/trunk/archetypeng/archetypeng-plugin/src/main/java/org/apache/maven/archetype/mojos/updateLocalCatalogMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetypeng-plugin/src/main/java/org/apache/maven/archetype/mojos/updateLocalCatalogMojo.java?rev=582431&r1=582430&r2=582431&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetypeng-plugin/src/main/java/org/apache/maven/archetype/mojos/updateLocalCatalogMojo.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetypeng-plugin/src/main/java/org/apache/maven/archetype/mojos/updateLocalCatalogMojo.java
Fri Oct  5 18:54:42 2007
@@ -24,7 +24,7 @@
  *
  * @author rafale
  */
-public class updateLocalCatalogMojo
+public class UpdateLocalCatalogMojo
     extends AbstractMojo
     implements ContextEnabled
 {



Mime
View raw message