Hey Raphaël, I added the settings to my settings.xml as you described and ran archetype:create-from-project. The POM file referenced 2.0-alpha-2.
$ mvn -P apache-snapshots archetype:create-from-project $ cat target/generated-sources/archetype/pom.xml <?xml version="1.0" encoding="UTF-8"?> <project> ... <version>1.0-SNAPSHOT</version> <build> <extensions> <extension> <groupId>org.apache.maven.archetype</groupId> <artifactId>archetype-packaging</artifactId> <version>2.0-alpha-2</version> </extension> </extensions> <plugins> <plugin> <artifactId>maven-archetype-plugin</artifactId> <version>2.0-alpha-2</version> <extensions>true</extensions> </plugin> </plugins> </build> </project> So I added the following to my parent POM, and the resulting POM under target/generated-sources/archetype had 2.0-alpha-3 in them. ... <build> ... <extensions> <extension> <groupId>org.apache.maven.archetype</groupId> <artifactId>archetype-packaging</artifactId> <version>2.0-alpha-3-SNAPSHOT</version> </extension> </extensions> ... <plugin> <artifactId>maven-archetype-plugin</artifactId> <version>2.0-alpha-3-SNAPSHOT</version> <extensions>true</extensions> </plugin> ... </build> ... Unfortunately, I now get the following error when rerunning archetype:create-from-project: ... [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. [INFO] Setting property: velocimacro.messages.on => 'false'. [INFO] Setting property: resource.loader => 'classpath'. [INFO] Setting property: resource.manager.logwhenfound => 'false'. [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] org/apache/commons/lang/StringUtils [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils at org.apache.velocity.runtime.resource.ResourceManagerImpl.initialize(ResourceManagerImpl.java:165) at org.apache.velocity.runtime.RuntimeInstance.initializeResourceManager(RuntimeInstance.java:594) at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:241) at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:116) at org.codehaus.plexus.velocity.DefaultVelocityComponent.initialize(DefaultVelocityComponent.java:79) ... I tried including commons-lang in POMs to see if that would help, but no luck. Thanks -----Original Message----- From: Raphaël Piéroni [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2008 3:40 PM To: Maven Users List Subject: Re: Multi-module archetypes Hi John, This feature is provided by the 2.0-alpha-3 version of the Archetype plugin. This version is not yet released. But you can try the last snapshot by adding a repository to apache snapshot [1]. 1. The goal to call from the project directory (or parent in case of a multi module) is 'mvn archetype:create-from-project'. 2. Then go to the target/generated-sources/archetype directory and see if the generated archetype is correct. install the archetype in your local repository by calling 'mvn install' as usual. 3. Then go to a fresh directory and call 'mvn archetype:generate -DarchetypeCatalog=local'. Step 3 may don't work because repositories defined in profiles in the settings.xml file are recognised only when maven is called in a project's directory. One may try to use the apache's snapshot repository as mirror of central (not tested). Another workaround i see is compiling the plugin from the sources. Please share your experience of using the plugin afterward. Thanks, Raphaël [1]: in settings.xml : <profile> <id>apache-snapshots</id> <repositories> <repository> <id>apache-snapshot</id> <name>Apache Snapshots</name> <releases> <enabled>false</enabled> <updatePolicy>never</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> <snapshots> <updatePolicy>always</updatePolicy> <checksumPolicy>warn</checksumPolicy> </snapshots> <url>http://people.apache.org/maven-snapshot-repository/</url> <layout>default</layout> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>apache-snapshot</id> <name>Apache Snapshots</name> <releases> <enabled>false</enabled> <updatePolicy>never</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> <snapshots> <updatePolicy>always</updatePolicy> <checksumPolicy>warn</checksumPolicy> </snapshots> <url>http://people.apache.org/maven-snapshot-repository/</url> <layout>default</layout> </pluginRepository> </pluginRepositories> </profile> 2008/3/28, Prystash,John <[EMAIL PROTECTED]>: > > I'm stepping into my first foray into creating archeyptes. In > general, is there support for creating an archetype for a multi-module > project? > Or is better to build a project with multiple archetypes? My first > thought would be I'd have problem injecting the parent project name > into the directory structure? > > MyService > MyService-core > MyService-container > > Thanks > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]