Hi, One can install an archetype (a project with packaging=maven-archetype) by calling mvn install. One can see a goal 'updateLocalCatalog' in this process.
Then in a fresh drectory, One can just call mvn archetyppe:generate -DarchetypeCatalog=local Hope this helps Raphaël 2008/7/17, Archambault, Daniel <[EMAIL PROTECTED]>: > Hi, > > I have created a simple archetype and installed it on my own machine (PC > running Windows XP). I can see that it is installed in C:\Documents and > Settings\<my_username>\.m2\repository\org\apache\maven\archetypes\<my_ar > chetype>. However, when I tried to use it with the goal "mvn > archetype:generate" I get the list below of internal archetypes from > which to chose but it doesn't include the one have installed. And when I > try to use it with the goal "mvn archetype:create ..." I get a message > saying that this goal is deprecated and the error message "Embedded > error: OldArchetype does not exist.". > > Could you please let me know what do I need to do so that the archetype > I installed shows up in the list of archetype provided by the goal "mvn > archetype:generate" ? > > Thanks, > Daniel > > C:\dan_tmp\osgi-wiket-template2_test>mvn archetype:create > -DarchetypeGroupId=com > .compuware.osgi -DarchetypeArtifactId=osgi-wiket-template2 > -DarchetypeVersion=1. > 0 -DgroupId=com.compuware.osgi > -DartifactId=osgi-wiket-template2_instance > > C:\dan_tmp\osgi-wiket-template2_test>mvn archetype:generate > [INFO] Scanning for projects... > [INFO] Searching repository for plugin with prefix: 'archetype'. > [INFO] > ------------------------------------------------------------------------ > [INFO] Building Maven Default Project > [INFO] task-segment: [archetype:generate] (aggregator-style) > [INFO] > ------------------------------------------------------------------------ > [INFO] Preparing archetype:generate > [INFO] No goals needed for project - skipping > [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] [archetype:generate] > [INFO] Generating project in Interactive mode > [INFO] No archetype defined. Using maven-archetype-quickstart > (org.apache.maven. > archetypes:maven-archetype-quickstart:1.0) > Choose archetype: > 1: internal -> appfuse-basic-jsf (AppFuse archetype for creating a web > applicati > on with Hibernate, Spring and JSF) > 2: internal -> appfuse-basic-spring (AppFuse archetype for creating a > web applic > ation with Hibernate, Spring and Spring MVC) > 3: internal -> appfuse-basic-struts (AppFuse archetype for creating a > web applic > ation with Hibernate, Spring and Struts 2) > 4: internal -> appfuse-basic-tapestry (AppFuse archetype for creating a > web appl > ication with Hibernate, Spring and Tapestry 4) > 5: internal -> appfuse-core (AppFuse archetype for creating a jar > application wi > th Hibernate and Spring and XFire) > 6: internal -> appfuse-modular-jsf (AppFuse archetype for creating a > modular app > lication with Hibernate, Spring and JSF) > 7: internal -> appfuse-modular-spring (AppFuse archetype for creating a > modular > application with Hibernate, Spring and Spring MVC) > 8: internal -> appfuse-modular-struts (AppFuse archetype for creating a > modular > application with Hibernate, Spring and Struts 2) > 9: internal -> appfuse-modular-tapestry (AppFuse archetype for creating > a modula > r application with Hibernate, Spring and Tapestry 4) > 10: internal -> maven-archetype-j2ee-simple (A simple J2EE Java > application) > 11: internal -> maven-archetype-marmalade-mojo (A Maven plugin > development proje > ct using marmalade) > 12: internal -> maven-archetype-mojo (A Maven Java plugin development > project) > 13: internal -> maven-archetype-portlet (A simple portlet application) > 14: internal -> maven-archetype-profiles () > 15: internal -> maven-archetype-quickstart () > 16: internal -> maven-archetype-site-simple (A simple site generation > project) > 17: internal -> maven-archetype-site (A more complex site project) > 18: internal -> maven-archetype-webapp (A simple Java web application) > 19: internal -> struts2-archetype-starter (A starter Struts 2 > application with S > itemesh, DWR, and Spring) > 20: internal -> struts2-archetype-blank (A minimal Struts 2 application) > 21: internal -> struts2-archetype-portlet (A minimal Struts 2 > application that c > an be deployed as a portlet) > 22: internal -> struts2-archetype-dbportlet (A starter Struts 2 portlet > that dem > onstrates a simple CRUD interface with db backing) > 23: internal -> struts2-archetype-plugin (A Struts 2 plugin) > 24: internal -> shale-archetype-blank (A blank Shale web application > with JSF) > 25: internal -> maven-adf-archetype (Archetype to ease the burden of > creating a > new application based with ADF) > 26: internal -> data-app (A new Databinder application with sources and > resource > s.) > 27: internal -> jini-service-archetype (Archetype for Jini service > project creat > ion) > 28: internal -> softeu-archetype-seam (JSF+Facelets+Seam Archetype) > 29: internal -> softeu-archetype-seam-simple (JSF+Facelets+Seam (no > persistence) > Archetype) > 30: internal -> softeu-archetype-jsf (JSF+Facelets Archetype) > 31: internal -> jpa-maven-archetype (JPA application) > 32: internal -> spring-osgi-bundle-archetype (Spring-OSGi archetype) > 33: internal -> confluence-plugin-archetype (Atlassian Confluence plugin > archety > pe) > 34: internal -> jira-plugin-archetype (Atlassian JIRA plugin archetype) > 35: internal -> maven-archetype-har (Hibernate Archive) > 36: internal -> maven-archetype-sar (JBoss Service Archive) > 37: internal -> wicket-archetype-quickstart (A simple Apache Wicket > project) > 38: internal -> quickstart (A simple Apache Tapestry 5 Project) > 39: internal -> scala-archetype-simple (A simple scala project) > 40: internal -> lift-archetype-blank (A blank/empty liftweb project) > 41: internal -> lift-archetype-basic (The basic (liftweb) project) > 42: internal -> cocoon-22-archetype-block-plain > ([http://cocoon.apache.org/2.2/m > aven-plugins/]) > 43: internal -> cocoon-22-archetype-block > ([http://cocoon.apache.org/2.2/maven-p > lugins/]) > 44: internal -> cocoon-22-archetype-webapp > ([http://cocoon.apache.org/2.2/maven- > plugins/]) > Choose a number: > (1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/2 > 4/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/42/43/44) 15: : > Le contenu de ce courriel s'adresse au destinataire seulement. Il contient > de l'information pouvant etre confidentielle. Vous ne devez ni le copier ni > l'utiliser ni le divulguer a qui que ce soit a moins que vous soyez le > destinataire ou une personne designee autorisee. Si vous le receviez par > erreur, veuillez nous aviser immediatement et le detruire. > > > The contents of this e-mail are intended for the named addressee only. It > contains information that may be confidential. Unless you are the named > addressee or an authorized designee, you may not copy or use it, or disclose > it to anyone else. If you received it in error please notify us immediately > and then destroy it. >
