You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Archambault, Daniel" <Da...@compuware.com> on 2008/07/17 17:40:30 UTC
How to use an archetype I installed locally
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.
RE: How to use an archetype I installed locally
Posted by "Archambault, Daniel" <Da...@compuware.com>.
Thank you very much Raphaël! I was missing the "-DarchetypeCatalog=local" ... Now it works fine.
-----Original Message-----
From: Raphaël Piéroni [mailto:raphaelpieroni@gmail.com]
Sent: Thursday, July 17, 2008 12:40 PM
To: Maven Users List
Subject: Re: How to use an archetype I installed locally
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 <Da...@compuware.com>:
> 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.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: How to use an archetype I installed locally
Posted by "Archambault, Daniel" <Da...@compuware.com>.
Thanks Raphaël. I misread part of your previous email ... using my archetypes deployed on a remote repository works fine now.
Many thanks,
Daniel
-----Original Message-----
From: Raphaël Piéroni [mailto:raphaelpieroni@gmail.com]
Sent: Wednesday, July 23, 2008 11:19 AM
To: Archambault, Daniel
Subject: Re: How to use an archetype I installed locally
easy!
crawl only crawl the filesystem.
you have to be on the machine to run crawl.
Raphaël
2008/7/23 Archambault, Daniel <Da...@compuware.com>:
> Hi Raphaël,
>
> We use nexus. When I use crawl as you mentioned below I get the following FileNotFoundException. Somehow crawl seems to pre-pend my current working dir to the path I specify in the repository argument. And, although the command output shows BUILD SUCCESSFUL as status there is no archetype-catalog.xml file that gets created in the remote repository. Could you please let know what I'm doing wrong?
>
> Many thanks,
> Daniel
>
> C:\dan_tmp\catalog>mvn archetype:crawl -Drepository=http://yul115347l01.clients.
> nasa.cpwr.corp:8081/nexus/content/repositories/releases
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'archetype'.
> [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] Building Maven Default Project
> [INFO] task-segment: [archetype:crawl] (aggregator-style)
> [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] [archetype:crawl]
> repository
> C:\dan_tmp\catalog\http:\yul115347l01.clients.nasa.cpwr.corp:8081\nex
> us\content\repositories\releases
> catalogFile null
> [WARNING] File is not a directory
> [WARNING] Catalog can not be writen to
> C:\dan_tmp\catalog\http:\yul115347l01.cli
> ents.nasa.cpwr.corp:8081\nexus\content\repositories\releases\archetype
> -catalog.x
> ml
> java.io.FileNotFoundException:
> C:\dan_tmp\catalog\http:\yul115347l01.clients.nas
> a.cpwr.corp:8081\nexus\content\repositories\releases\archetype-catalog
> .xml (The filename, directory name, or volume label syntax is incorrect)
> at java.io.FileOutputStream.open(Native Method)
> at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
> at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
> at java.io.FileWriter.<init>(FileWriter.java:73)
> at
> org.apache.maven.archetype.repositorycrawler.DefaultRepositoryCrawler
> .writeCatalog(DefaultRepositoryCrawler.java:170)
> at
> org.apache.maven.archetype.mojos.CrawlRepositoryMojo.execute(CrawlRep
> ositoryMojo.java:77)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:451)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:558)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
> Goal(DefaultLifecycleExecutor.java:512)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:482)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:330)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:227)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.java:142)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] Total time: 3 seconds
> [INFO] Finished at: Wed Jul 23 10:49:08 EDT 2008 [INFO] Final Memory:
> 6M/11M [INFO]
> ----------------------------------------------------------------------
> --
>
> C:\dan_tmp\catalog>
>
> -----Original Message-----
> From: Raphaël Piéroni [mailto:raphaelpieroni@gmail.com]
> Sent: Wednesday, July 23, 2008 9:59 AM
> To: Archambault, Daniel
> Subject: Re: How to use an archetype I installed locally
>
> Hi Daniel,
>
> The archetype plugin doesn't currently update any remote catalog when deploying.
>
> The best you can do is to create an archetype catalog by yourself.
> It is an XML file. Just try to use the goal archetype:crawl
> (http://maven.apache.org/plugins/maven-archetype-plugin/crawl-mojo.htm
> l)
> to have an example.
>
> Be aware that the crawl goal works on filesystem only.
>
> Once you're happy with your catalog, just upload it by hand to your repository.
>
> If you have phisical access (or ssh to your repository) i assume a machine hosting archiva or nexus, just use the crawl goal.
>
> The to use the catalog, just call mvn archetype:generate
> -DarchetypeCatalog=http://path-to-the-catalog
>
> I had corrected an issue in the catalog downloading on the 2.0-alpha-4 branch (not yet released) about catalog downloading.
> So you may have to try some different URLs until you succeed.
>
> If the URL you give is http://machine:port/path then the catalog
> should be at http://machine:port/path/archetype-catalog.xml
> and your archetype at
> http://machine:port/path/com/company/myarchetype/1.0/myarchetype-1.0.j
> ar
>
> Hope this helps.
>
> Please consider giving your answer to the community with the correct process that worked for you.
>
>
> Regards,
>
> Raphaël
>
> PS: i remember having see your first mail on the list but it was so
> unreadable, and i was working on another project at that time that i
> though someone else could have helped you. ;-)
>
> PPS: apparemment vos bureaux ne sont pas trop loin du terminus du
> métro 9. ;-)
>
>
> 2008/7/23 Archambault, Daniel <Da...@compuware.com>:
>> Hi Raphaël,
>>
>> I'm unable to use an archetype that I deployed on a remote repository, the goal archetype:generate doesn't list it in the available archetypes. I appreciated very much your help below for a similar problem! I feel ridiculous to ask for your help again for a very similar thing ... I did try though everything I can think of ... in the attached email is more details on what I tried, however I haven't received any answer yet from the Maven Users List.
>>
>> Could you please let me know what I'm doing wrong in trying to use the archetype that I've deployed to the remote repository.
>>
>> Thanks,
>> Daniel
>>
>> -----Original Message-----
>> From: Raphaël Piéroni [mailto:raphaelpieroni@gmail.com]
>> Sent: Thursday, July 17, 2008 12:40 PM
>> To: Maven Users List
>> Subject: Re: How to use an archetype I installed locally
>>
>> 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 <Da...@compuware.com>:
>>> 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\<m
>>> y _ 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.
>>>
>>
>>
>> ---------- Message transféré ----------
>> From: "Archambault, Daniel" <Da...@compuware.com>
>> To: "Maven Users List" <us...@maven.apache.org>
>> Date: Mon, 21 Jul 2008 19:19:43 -0400
>> Subject: How to use an archetype I deployed Hi,
>>
>> Could you please let me know how to use an archetype that I deploy? I
>> seem to have deployed successfully an archetype but I'm unable to use
>> it, namely the goal "mvn archetype:generate" is unable to find my
>> archetype.
>>
>> In more details, I created an archetype which I was able to install
>> locally using "mvn install" and also able to use it with the goal
>> "mvn archetype:generate -DarchetypeCatalog=local". Then, I deploy
>> using the command "mvn deploy" which showed ... deploy:deploy ...
>> Uploading: <my archetype's jar url> ... BUILD SUCCESSFUL. I'm able to
>> see the file really exists in a browser at <my archetype's jar url>.
>>
>> However, when I try the command "mvn archetype:generate" my archetype
>> doesn't appear in the list of archetypes to chose from. I also tried
>> specifying the -DarchetypeRepository argument setting it to the value
>> of our mirror repository's url but it gives the same list of
>> archetype as when ran without this argument. I also tried to use the
>> archetypeCatalog argument but without success, I can't seem to find
>> the archetype-catalog.xml on the remote repository where I deploy (I
>> was epecting to see it at a similar location as the one on my machine i.e.
>> in ~/.m2) so I guess that might be an indicator that there is an
>> extra step I need to do for having the archetype-catalog.xml be
>> generated on the remote repository??? I also tried specifying the
>> remote repository in mirror, repositories and and pluginrepositories
>> in the pom, user and maven settings, and using the
>> archetypeArtifactId argument but the archetype:generate still cannot find my archetype.
>>
>> Thanks,
>> Daniel
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to use an archetype I installed locally
Posted by Raphaël Piéroni <ra...@gmail.com>.
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 <Da...@compuware.com>:
> 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.
>