RE: Maven ignores my archetype selection
Hi Kalle, I'm running into a similar problem. But the archetype I'm trying to use is in an inhouse remote repository. I have specified that in my settings.xml. However, Maven is still unable to pick that up from settings.xml. I also tried -DarchetypeRepository=URL to the remote repository. When I executed: I get the following error log: mvn archetype:create -DarchetypeGroupId=com.myorg.2008 -DarchetypeArtifactId=custom-archetype -DarchetypeVersion=1.0-SNAPSHOT -DgroupId=Custom-Venkat -DartifactId=Sample-Venkat [INFO] Scanning for projects... [INFO] [INFO] Building Maven Default Project [INFO]task-segment: [org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create] (aggregator-style) [INFO] [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] ** [INFO] Starting Jakarta Velocity v1.4 [INFO] RuntimeInstance initializing. [INFO] Default Properties File: org/apache/velocity/runtime/defaults/velocity.properties [INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl) [INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader [INFO] ClasspathResourceLoader : initialization starting. [INFO] ClasspathResourceLoader : initialization complete. [INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl) [INFO] Default ResourceManager initialization complete. [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach [INFO] Created: 20 parsers. [INFO] Velocimacro : initialization starting. [INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader. [INFO] Velocimacro : error using VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm' [INFO] Velocimacro : VM library template macro registration complete. [INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed. [INFO] Velocimacro : initialization complete. [INFO] Velocity successfully started. [INFO] [archetype:create] [INFO] Defaulting package to group ID: Custom-Venkat [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. GroupId: com.myorg.2008 ArtifactId: custom-archetype Version: 1.0-SNAPSHOT Reason: Unable to download the artifact from any repository Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=com.myorg.2008 -DartifactId=custom-archetype \ -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=com.myorg.2008 -DartifactId=custom-archetype \ -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file \ -Durl=[url] -DrepositoryId=[id] com.myorg.2008:custom-archetype:jar:1.0-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 2 seconds [INFO] Finished at: Mon Feb 25 15:08:54 EST 2008 [INFO] Final Memory: 8M/358M [INFO] Thanks, Venkat -Original Message- From: Kalle Korhonen [mailto:[EMAIL PROTECTED] Sent: Thursday, February 21, 2008 6:19 PM To: Maven Users List Subject: Re: Maven ignores my archetype selection Tom, I already replied to your comment you left at http://docs.codehaus.org/display/TRAILS/Quick+Start with the same informatoin
RE: Maven ignores my archetype selection
That works!!! Thanks a lot!! -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Monday, February 25, 2008 3:29 PM To: Maven Users List Subject: Re: Maven ignores my archetype selection On Mon, Feb 25, 2008 at 1:21 PM, Krishnamurthi, Venkat [EMAIL PROTECTED] wrote: But the archetype I'm trying to use is in an inhouse remote repository. I have specified that in my settings.xml. However, Maven is still unable to pick that up from settings.xml. I also tried -DarchetypeRepository=URL to the remote repository. The 2.0-alpha-2 release was supposed to restore backwards compatibility, and the parameter used to be -DremoteRepositories=... . Does that work? Old docs: http://maven.apache.org/plugins/maven-archetype-plugin-1.0-alpha-7/creat e-mojo.html -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Maven ignores my archetype selection
That works. Thanks! However, maven does not pick up the URL's specified under repositories or pluginrepositories in settings.xml. How do we address that issue? -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Monday, February 25, 2008 3:29 PM To: Maven Users List Subject: Re: Maven ignores my archetype selection On Mon, Feb 25, 2008 at 1:21 PM, Krishnamurthi, Venkat [EMAIL PROTECTED] wrote: But the archetype I'm trying to use is in an inhouse remote repository. I have specified that in my settings.xml. However, Maven is still unable to pick that up from settings.xml. I also tried -DarchetypeRepository=URL to the remote repository. The 2.0-alpha-2 release was supposed to restore backwards compatibility, and the parameter used to be -DremoteRepositories=... . Does that work? Old docs: http://maven.apache.org/plugins/maven-archetype-plugin-1.0-alpha-7/creat e-mojo.html -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven ignores my archetype selection
On Mon, Feb 25, 2008 at 1:21 PM, Krishnamurthi, Venkat [EMAIL PROTECTED] wrote: But the archetype I'm trying to use is in an inhouse remote repository. I have specified that in my settings.xml. However, Maven is still unable to pick that up from settings.xml. I also tried -DarchetypeRepository=URL to the remote repository. The 2.0-alpha-2 release was supposed to restore backwards compatibility, and the parameter used to be -DremoteRepositories=... . Does that work? Old docs: http://maven.apache.org/plugins/maven-archetype-plugin-1.0-alpha-7/create-mojo.html -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven ignores my archetype selection
On Mon, Feb 25, 2008 at 1:51 PM, Krishnamurthi, Venkat [EMAIL PROTECTED] wrote: That works. Thanks! However, maven does not pick up the URL's specified under repositories or pluginrepositories in settings.xml. How do we address that issue? It's a known issue: http://jira.codehaus.org/browse/ARCHETYPE-59 . Issues 81 and 89 may also be relevant. This isn't just an Archetype problem, the Stage plugin suffers from the same thing. If there is no project (== pom.xml in the current directory) then Maven does not see your settings.xml file. -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Maven ignores my archetype selection
Thanks! -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Monday, February 25, 2008 4:01 PM To: Maven Users List Subject: Re: Maven ignores my archetype selection On Mon, Feb 25, 2008 at 1:51 PM, Krishnamurthi, Venkat [EMAIL PROTECTED] wrote: That works. Thanks! However, maven does not pick up the URL's specified under repositories or pluginrepositories in settings.xml. How do we address that issue? It's a known issue: http://jira.codehaus.org/browse/ARCHETYPE-59 . Issues 81 and 89 may also be relevant. This isn't just an Archetype problem, the Stage plugin suffers from the same thing. If there is no project (== pom.xml in the current directory) then Maven does not see your settings.xml file. -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven ignores my archetype selection
On Sunday 17 February 2008 10:31:01 Brian E. Fox wrote: I think the list is currently embedded, but you might be able to add it to ~home/.m2/archetype.xml, otherwise you'll need to back down to 1.0-alpha-7 (this issue is fixed in 2.0-alpha-2 once it gets released) I just had the problem yesterday, and got around it by adding -DarchetypeRepository=my local repo, and it picked it up from there Eric -Original Message- From: Tom Cook [mailto:[EMAIL PROTECTED] Sent: Saturday, February 16, 2008 5:13 PM To: Maven Users List Subject: Re: Maven ignores my archetype selection Ah, OK, I see. So how do I tell it that I want to use the trails archetype? It's not in the list it gives me. Do I need to download the archetype manually first? Thanks for the help. Tom On Feb 17, 2008 1:35 AM, Brian E. Fox [EMAIL PROTECTED] wrote: The new ones prompt you from the command line. Just pick the one you need from the prompts. -Original Message- From: Tom Cook [mailto:[EMAIL PROTECTED] Sent: Saturday, February 16, 2008 4:07 AM To: Maven Users List Subject: Re: Maven ignores my archetype selection Thanks for the quick answer. I don't particularly need old style commands, and didn't really realise there were 'old-style' and 'new-style' commands, I was just following the documentation - eg. Maven in 5 Minutes, http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html from which the first command in my post was taken. So, given that I don't need old-style commands, what do new-style commands look like? Where can I find documentation on them? Regards, Tom On Sat, Feb 16, 2008 at 6:03 PM, Brian E. Fox [EMAIL PROTECTED] wrote: Use org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:createif you need the old style commands. The new version 2.0 has an issue with backwards compat and should be fixed shortly. -Original Message- From: Tom Cook [mailto:[EMAIL PROTECTED] Sent: Friday, February 15, 2008 9:42 PM To: users@maven.apache.org Subject: Maven ignores my archetype selection Hi all, I hate asking noob questions, but I have looked in the bug tracker, the FAQ, the list archive and the doco and can't see any mention of it, so here goes: I have downloaded maven 2.0.8 on my Ubuntu gutsy machine, unpacked it and moved it to /usr/local/apache-maven. I have set up my environment as follows: echo $M2 /usr/local/apache-maven/bin echo $M2_HOME /usr/local/apache-maven echo $JAVA_HOME /usr/lib/jvm/java-1.5.0-sun java -version java version 1.5.0_13 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05) Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode, sharing) mvn -version /usr/lib/jvm/java-1.5.0-sun/bin/java -classpath /usr/local/apache-maven/boot/classworlds-1.1.jar - Dclassworlds.conf=/usr/local/apache-maven/bin/m2.conf - Dmaven.home=/usr/local/apache-maven org.codehaus.classworlds.Launcher -version Maven version: 2.0.8 Java version: 1.5.0_13 OS name: linux version: 2.6.22-14-generic arch: i386 Family: unix But when I try: mvn archetype:create -DgroupId=com.my-package -DartifactId=my-app [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] --- - [INFO] Building Maven Default Project [INFO]task-segment: [archetype:create] (aggregator-style) [INFO] --- - [INFO] Preparing archetype:create [INFO] No goals needed for project - skipping Downloading: http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-beta-2 /wagon-http-shared-1.0-beta-2.pom Downloading: http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-beta-2 /wagon-http-shared-1.0-beta-2.pom [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:create] Choose archetype: 1: internal - appfuse-basic-jsf (AppFuse archetype for creating a web application with Hibernate, Spring and JSF) 2: internal - appfuse-basic-spring (AppFuse archetype for creating a web application with Hibernate, Spring and Spring MVC) 3: internal - appfuse-basic-struts (AppFuse archetype for creating a web application with Hibernate, Spring and Struts 2) 4: internal - appfuse-basic-tapestry (AppFuse archetype for creating a web application with Hibernate, Spring and Tapestry 4) 5: internal - appfuse-core (AppFuse
Re: Maven ignores my archetype selection
Tom, I already replied to your comment you left at http://docs.codehaus.org/display/TRAILS/Quick+Start with the same informatoin others have provided: use the older archetype. Kalle On Sat, Feb 16, 2008 at 2:13 PM, Tom Cook [EMAIL PROTECTED] wrote: Ah, OK, I see. So how do I tell it that I want to use the trails archetype? It's not in the list it gives me. Do I need to download the archetype manually first? Thanks for the help. Tom On Feb 17, 2008 1:35 AM, Brian E. Fox [EMAIL PROTECTED] wrote: The new ones prompt you from the command line. Just pick the one you need from the prompts. -Original Message- From: Tom Cook [mailto:[EMAIL PROTECTED] Sent: Saturday, February 16, 2008 4:07 AM To: Maven Users List Subject: Re: Maven ignores my archetype selection Thanks for the quick answer. I don't particularly need old style commands, and didn't really realise there were 'old-style' and 'new-style' commands, I was just following the documentation - eg. Maven in 5 Minutes, http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html from which the first command in my post was taken. So, given that I don't need old-style commands, what do new-style commands look like? Where can I find documentation on them? Regards, Tom On Sat, Feb 16, 2008 at 6:03 PM, Brian E. Fox [EMAIL PROTECTED] wrote: Use org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:createif you need the old style commands. The new version 2.0 has an issue with backwards compat and should be fixed shortly. -Original Message- From: Tom Cook [mailto:[EMAIL PROTECTED] Sent: Friday, February 15, 2008 9:42 PM To: users@maven.apache.org Subject: Maven ignores my archetype selection Hi all, I hate asking noob questions, but I have looked in the bug tracker, the FAQ, the list archive and the doco and can't see any mention of it, so here goes: I have downloaded maven 2.0.8 on my Ubuntu gutsy machine, unpacked it and moved it to /usr/local/apache-maven. I have set up my environment as follows: echo $M2 /usr/local/apache-maven/bin echo $M2_HOME /usr/local/apache-maven echo $JAVA_HOME /usr/lib/jvm/java-1.5.0-sun java -version java version 1.5.0_13 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05) Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode, sharing) mvn -version /usr/lib/jvm/java-1.5.0-sun/bin/java -classpath /usr/local/apache-maven/boot/classworlds-1.1.jar - Dclassworlds.conf=/usr/local/apache-maven/bin/m2.conf - Dmaven.home=/usr/local/apache-maven org.codehaus.classworlds.Launcher -version Maven version: 2.0.8 Java version: 1.5.0_13 OS name: linux version: 2.6.22-14-generic arch: i386 Family: unix But when I try: mvn archetype:create -DgroupId=com.my-package -DartifactId=my-app [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] [INFO] Building Maven Default Project [INFO]task-segment: [archetype:create] (aggregator-style) [INFO] [INFO] Preparing archetype:create [INFO] No goals needed for project - skipping Downloading: http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pom Downloading: http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pom [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:create] Choose archetype: 1: internal - appfuse-basic-jsf (AppFuse archetype for creating a web application with Hibernate, Spring and JSF) 2: internal - appfuse-basic-spring (AppFuse archetype for creating a web application with Hibernate, Spring and Spring MVC) 3: internal - appfuse-basic-struts (AppFuse archetype for creating a web application with Hibernate, Spring and Struts 2) 4: internal - appfuse-basic-tapestry (AppFuse archetype for creating a web application with Hibernate, Spring and Tapestry 4) 5: internal - appfuse-core (AppFuse archetype for creating a jar application with Hibernate and Spring and XFire) 6: internal - appfuse-modular-jsf (AppFuse archetype for creating a modular application 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
Re: Maven ignores my archetype selection
Thanks for the quick answer. I don't particularly need old style commands, and didn't really realise there were 'old-style' and 'new-style' commands, I was just following the documentation - eg. Maven in 5 Minutes,http://maven.apache.org/guides/getting-started/maven-in-five-minutes.htmlfrom which the first command in my post was taken. So, given that I don't need old-style commands, what do new-style commands look like? Where can I find documentation on them? Regards, Tom On Sat, Feb 16, 2008 at 6:03 PM, Brian E. Fox [EMAIL PROTECTED] wrote: Use org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create if you need the old style commands. The new version 2.0 has an issue with backwards compat and should be fixed shortly. -Original Message- From: Tom Cook [mailto:[EMAIL PROTECTED] Sent: Friday, February 15, 2008 9:42 PM To: users@maven.apache.org Subject: Maven ignores my archetype selection Hi all, I hate asking noob questions, but I have looked in the bug tracker, the FAQ, the list archive and the doco and can't see any mention of it, so here goes: I have downloaded maven 2.0.8 on my Ubuntu gutsy machine, unpacked it and moved it to /usr/local/apache-maven. I have set up my environment as follows: echo $M2 /usr/local/apache-maven/bin echo $M2_HOME /usr/local/apache-maven echo $JAVA_HOME /usr/lib/jvm/java-1.5.0-sun java -version java version 1.5.0_13 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05) Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode, sharing) mvn -version /usr/lib/jvm/java-1.5.0-sun/bin/java -classpath /usr/local/apache-maven/boot/classworlds-1.1.jar - Dclassworlds.conf=/usr/local/apache-maven/bin/m2.conf - Dmaven.home=/usr/local/apache-maven org.codehaus.classworlds.Launcher -version Maven version: 2.0.8 Java version: 1.5.0_13 OS name: linux version: 2.6.22-14-generic arch: i386 Family: unix But when I try: mvn archetype:create -DgroupId=com.my-package -DartifactId=my-app [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] [INFO] Building Maven Default Project [INFO]task-segment: [archetype:create] (aggregator-style) [INFO] [INFO] Preparing archetype:create [INFO] No goals needed for project - skipping Downloading: http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pom Downloading: http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pom [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:create] Choose archetype: 1: internal - appfuse-basic-jsf (AppFuse archetype for creating a web application with Hibernate, Spring and JSF) 2: internal - appfuse-basic-spring (AppFuse archetype for creating a web application with Hibernate, Spring and Spring MVC) 3: internal - appfuse-basic-struts (AppFuse archetype for creating a web application with Hibernate, Spring and Struts 2) 4: internal - appfuse-basic-tapestry (AppFuse archetype for creating a web application with Hibernate, Spring and Tapestry 4) 5: internal - appfuse-core (AppFuse archetype for creating a jar application with Hibernate and Spring and XFire) 6: internal - appfuse-modular-jsf (AppFuse archetype for creating a modular application 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 modular 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 project 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 Sitemesh, DWR, and Spring) 20: internal - struts2-archetype-blank (A minimal
RE: Maven ignores my archetype selection
The new ones prompt you from the command line. Just pick the one you need from the prompts. -Original Message- From: Tom Cook [mailto:[EMAIL PROTECTED] Sent: Saturday, February 16, 2008 4:07 AM To: Maven Users List Subject: Re: Maven ignores my archetype selection Thanks for the quick answer. I don't particularly need old style commands, and didn't really realise there were 'old-style' and 'new-style' commands, I was just following the documentation - eg. Maven in 5 Minutes,http://maven.apache.org/guides/getting-started/maven-in-five-minutes.htmlfrom which the first command in my post was taken. So, given that I don't need old-style commands, what do new-style commands look like? Where can I find documentation on them? Regards, Tom On Sat, Feb 16, 2008 at 6:03 PM, Brian E. Fox [EMAIL PROTECTED] wrote: Use org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create if you need the old style commands. The new version 2.0 has an issue with backwards compat and should be fixed shortly. -Original Message- From: Tom Cook [mailto:[EMAIL PROTECTED] Sent: Friday, February 15, 2008 9:42 PM To: users@maven.apache.org Subject: Maven ignores my archetype selection Hi all, I hate asking noob questions, but I have looked in the bug tracker, the FAQ, the list archive and the doco and can't see any mention of it, so here goes: I have downloaded maven 2.0.8 on my Ubuntu gutsy machine, unpacked it and moved it to /usr/local/apache-maven. I have set up my environment as follows: echo $M2 /usr/local/apache-maven/bin echo $M2_HOME /usr/local/apache-maven echo $JAVA_HOME /usr/lib/jvm/java-1.5.0-sun java -version java version 1.5.0_13 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05) Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode, sharing) mvn -version /usr/lib/jvm/java-1.5.0-sun/bin/java -classpath /usr/local/apache-maven/boot/classworlds-1.1.jar - Dclassworlds.conf=/usr/local/apache-maven/bin/m2.conf - Dmaven.home=/usr/local/apache-maven org.codehaus.classworlds.Launcher -version Maven version: 2.0.8 Java version: 1.5.0_13 OS name: linux version: 2.6.22-14-generic arch: i386 Family: unix But when I try: mvn archetype:create -DgroupId=com.my-package -DartifactId=my-app [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] [INFO] Building Maven Default Project [INFO]task-segment: [archetype:create] (aggregator-style) [INFO] [INFO] Preparing archetype:create [INFO] No goals needed for project - skipping Downloading: http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pom Downloading: http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pom [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:create] Choose archetype: 1: internal - appfuse-basic-jsf (AppFuse archetype for creating a web application with Hibernate, Spring and JSF) 2: internal - appfuse-basic-spring (AppFuse archetype for creating a web application with Hibernate, Spring and Spring MVC) 3: internal - appfuse-basic-struts (AppFuse archetype for creating a web application with Hibernate, Spring and Struts 2) 4: internal - appfuse-basic-tapestry (AppFuse archetype for creating a web application with Hibernate, Spring and Tapestry 4) 5: internal - appfuse-core (AppFuse archetype for creating a jar application with Hibernate and Spring and XFire) 6: internal - appfuse-modular-jsf (AppFuse archetype for creating a modular application 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 modular 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 project 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
Re: Maven ignores my archetype selection
Ah, OK, I see. So how do I tell it that I want to use the trails archetype? It's not in the list it gives me. Do I need to download the archetype manually first? Thanks for the help. Tom On Feb 17, 2008 1:35 AM, Brian E. Fox [EMAIL PROTECTED] wrote: The new ones prompt you from the command line. Just pick the one you need from the prompts. -Original Message- From: Tom Cook [mailto:[EMAIL PROTECTED] Sent: Saturday, February 16, 2008 4:07 AM To: Maven Users List Subject: Re: Maven ignores my archetype selection Thanks for the quick answer. I don't particularly need old style commands, and didn't really realise there were 'old-style' and 'new-style' commands, I was just following the documentation - eg. Maven in 5 Minutes, http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html from which the first command in my post was taken. So, given that I don't need old-style commands, what do new-style commands look like? Where can I find documentation on them? Regards, Tom On Sat, Feb 16, 2008 at 6:03 PM, Brian E. Fox [EMAIL PROTECTED] wrote: Use org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:createif you need the old style commands. The new version 2.0 has an issue with backwards compat and should be fixed shortly. -Original Message- From: Tom Cook [mailto:[EMAIL PROTECTED] Sent: Friday, February 15, 2008 9:42 PM To: users@maven.apache.org Subject: Maven ignores my archetype selection Hi all, I hate asking noob questions, but I have looked in the bug tracker, the FAQ, the list archive and the doco and can't see any mention of it, so here goes: I have downloaded maven 2.0.8 on my Ubuntu gutsy machine, unpacked it and moved it to /usr/local/apache-maven. I have set up my environment as follows: echo $M2 /usr/local/apache-maven/bin echo $M2_HOME /usr/local/apache-maven echo $JAVA_HOME /usr/lib/jvm/java-1.5.0-sun java -version java version 1.5.0_13 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05) Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode, sharing) mvn -version /usr/lib/jvm/java-1.5.0-sun/bin/java -classpath /usr/local/apache-maven/boot/classworlds-1.1.jar - Dclassworlds.conf=/usr/local/apache-maven/bin/m2.conf - Dmaven.home=/usr/local/apache-maven org.codehaus.classworlds.Launcher -version Maven version: 2.0.8 Java version: 1.5.0_13 OS name: linux version: 2.6.22-14-generic arch: i386 Family: unix But when I try: mvn archetype:create -DgroupId=com.my-package -DartifactId=my-app [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] [INFO] Building Maven Default Project [INFO]task-segment: [archetype:create] (aggregator-style) [INFO] [INFO] Preparing archetype:create [INFO] No goals needed for project - skipping Downloading: http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pom Downloading: http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pom [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:create] Choose archetype: 1: internal - appfuse-basic-jsf (AppFuse archetype for creating a web application with Hibernate, Spring and JSF) 2: internal - appfuse-basic-spring (AppFuse archetype for creating a web application with Hibernate, Spring and Spring MVC) 3: internal - appfuse-basic-struts (AppFuse archetype for creating a web application with Hibernate, Spring and Struts 2) 4: internal - appfuse-basic-tapestry (AppFuse archetype for creating a web application with Hibernate, Spring and Tapestry 4) 5: internal - appfuse-core (AppFuse archetype for creating a jar application with Hibernate and Spring and XFire) 6: internal - appfuse-modular-jsf (AppFuse archetype for creating a modular application 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 modular 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
RE: Maven ignores my archetype selection
I think the list is currently embedded, but you might be able to add it to ~home/.m2/archetype.xml, otherwise you'll need to back down to 1.0-alpha-7 (this issue is fixed in 2.0-alpha-2 once it gets released) -Original Message- From: Tom Cook [mailto:[EMAIL PROTECTED] Sent: Saturday, February 16, 2008 5:13 PM To: Maven Users List Subject: Re: Maven ignores my archetype selection Ah, OK, I see. So how do I tell it that I want to use the trails archetype? It's not in the list it gives me. Do I need to download the archetype manually first? Thanks for the help. Tom On Feb 17, 2008 1:35 AM, Brian E. Fox [EMAIL PROTECTED] wrote: The new ones prompt you from the command line. Just pick the one you need from the prompts. -Original Message- From: Tom Cook [mailto:[EMAIL PROTECTED] Sent: Saturday, February 16, 2008 4:07 AM To: Maven Users List Subject: Re: Maven ignores my archetype selection Thanks for the quick answer. I don't particularly need old style commands, and didn't really realise there were 'old-style' and 'new-style' commands, I was just following the documentation - eg. Maven in 5 Minutes, http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html from which the first command in my post was taken. So, given that I don't need old-style commands, what do new-style commands look like? Where can I find documentation on them? Regards, Tom On Sat, Feb 16, 2008 at 6:03 PM, Brian E. Fox [EMAIL PROTECTED] wrote: Use org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:createif you need the old style commands. The new version 2.0 has an issue with backwards compat and should be fixed shortly. -Original Message- From: Tom Cook [mailto:[EMAIL PROTECTED] Sent: Friday, February 15, 2008 9:42 PM To: users@maven.apache.org Subject: Maven ignores my archetype selection Hi all, I hate asking noob questions, but I have looked in the bug tracker, the FAQ, the list archive and the doco and can't see any mention of it, so here goes: I have downloaded maven 2.0.8 on my Ubuntu gutsy machine, unpacked it and moved it to /usr/local/apache-maven. I have set up my environment as follows: echo $M2 /usr/local/apache-maven/bin echo $M2_HOME /usr/local/apache-maven echo $JAVA_HOME /usr/lib/jvm/java-1.5.0-sun java -version java version 1.5.0_13 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05) Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode, sharing) mvn -version /usr/lib/jvm/java-1.5.0-sun/bin/java -classpath /usr/local/apache-maven/boot/classworlds-1.1.jar - Dclassworlds.conf=/usr/local/apache-maven/bin/m2.conf - Dmaven.home=/usr/local/apache-maven org.codehaus.classworlds.Launcher -version Maven version: 2.0.8 Java version: 1.5.0_13 OS name: linux version: 2.6.22-14-generic arch: i386 Family: unix But when I try: mvn archetype:create -DgroupId=com.my-package -DartifactId=my-app [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] [INFO] Building Maven Default Project [INFO]task-segment: [archetype:create] (aggregator-style) [INFO] [INFO] Preparing archetype:create [INFO] No goals needed for project - skipping Downloading: http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pom Downloading: http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pom [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:create] Choose archetype: 1: internal - appfuse-basic-jsf (AppFuse archetype for creating a web application with Hibernate, Spring and JSF) 2: internal - appfuse-basic-spring (AppFuse archetype for creating a web application with Hibernate, Spring and Spring MVC) 3: internal - appfuse-basic-struts (AppFuse archetype for creating a web application with Hibernate, Spring and Struts 2) 4: internal - appfuse-basic-tapestry (AppFuse archetype for creating a web application with Hibernate, Spring and Tapestry 4) 5: internal - appfuse-core (AppFuse archetype for creating a jar application with Hibernate and Spring and XFire) 6: internal - appfuse-modular-jsf (AppFuse archetype for creating a modular application 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
RE: Maven ignores my archetype selection
Use org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create if you need the old style commands. The new version 2.0 has an issue with backwards compat and should be fixed shortly. -Original Message- From: Tom Cook [mailto:[EMAIL PROTECTED] Sent: Friday, February 15, 2008 9:42 PM To: users@maven.apache.org Subject: Maven ignores my archetype selection Hi all, I hate asking noob questions, but I have looked in the bug tracker, the FAQ, the list archive and the doco and can't see any mention of it, so here goes: I have downloaded maven 2.0.8 on my Ubuntu gutsy machine, unpacked it and moved it to /usr/local/apache-maven. I have set up my environment as follows: echo $M2 /usr/local/apache-maven/bin echo $M2_HOME /usr/local/apache-maven echo $JAVA_HOME /usr/lib/jvm/java-1.5.0-sun java -version java version 1.5.0_13 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05) Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode, sharing) mvn -version /usr/lib/jvm/java-1.5.0-sun/bin/java -classpath /usr/local/apache-maven/boot/classworlds-1.1.jar - Dclassworlds.conf=/usr/local/apache-maven/bin/m2.conf - Dmaven.home=/usr/local/apache-maven org.codehaus.classworlds.Launcher-version Maven version: 2.0.8 Java version: 1.5.0_13 OS name: linux version: 2.6.22-14-generic arch: i386 Family: unix But when I try: mvn archetype:create -DgroupId=com.my-package -DartifactId=my-app [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] [INFO] Building Maven Default Project [INFO]task-segment: [archetype:create] (aggregator-style) [INFO] [INFO] Preparing archetype:create [INFO] No goals needed for project - skipping Downloading: http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pom Downloading: http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pom [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:create] Choose archetype: 1: internal - appfuse-basic-jsf (AppFuse archetype for creating a web application with Hibernate, Spring and JSF) 2: internal - appfuse-basic-spring (AppFuse archetype for creating a web application with Hibernate, Spring and Spring MVC) 3: internal - appfuse-basic-struts (AppFuse archetype for creating a web application with Hibernate, Spring and Struts 2) 4: internal - appfuse-basic-tapestry (AppFuse archetype for creating a web application with Hibernate, Spring and Tapestry 4) 5: internal - appfuse-core (AppFuse archetype for creating a jar application with Hibernate and Spring and XFire) 6: internal - appfuse-modular-jsf (AppFuse archetype for creating a modular application 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 modular 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 project 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 Sitemesh, DWR, and Spring) 20: internal - struts2-archetype-blank (A minimal Struts 2 application) 21: internal - struts2-archetype-portlet (A minimal Struts 2 application that can be deployed as a portlet) 22: internal - struts2-archetype-dbportlet (A starter Struts 2 portlet that demonstrates 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 resources.) 27: internal - jini-service-archetype (Archetype for Jini