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 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.h
> tml
> > >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: [email protected]
> > > 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-bet
> a-2/wagon-http-shared-1.0-beta-2.pom
> > > Downloading:
> > >
> > >
> >
> http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-bet
> a-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 service
> > project
> > > creation)
> > > 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
> > > archetype)
> > > 34: internal -> maven-archetype-har (Hibernate Archive)
> > > 35: internal -> maven-archetype-sar (JBoss Service Archive)
> > > 36: internal -> wicket-archetype-quickstart (A simple Apache 
> > > Wicket
> > > project)
> > > 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/24/25/26/27
/28/29/30/31/32/33/34/35/36):
> > >
> > >
> > > Some questions:
> > >
> > > The doco seems to imply that maven will select the default 
> > > archetype, quickstart, but it doesn't.  Why?
> > >
> > > Why does it try to download
> > >
> > >
> >
>
http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-beta-
2/wagon-http-shared-1.0-beta-2.pom?
> > > That doesn't look like it makes much sense to me, but perhaps I am
> > missing
> > > something?
> > >
> > > I tried specifying the archetype explicitly on the command line 
> > > (trailsframework is the thing I am actually interested in):
> > >
> > > >mvn archetype:create
> > > -DarchetypeGroupId=
> > > org.trailsframework-DarchetypeArtifactId=trails-archetype
> > > -DarchetypeVersion=
> > > 1.1.1 -DgroupId=com.my-package -DartifactId=myTrailsProject [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-bet
> a-2/wagon-http-shared-1.0-beta-2.pom
> > > Downloading:
> > >
> > >
> >
> http://repo1.maven.org/maven2/com/my-package/wagon-http-shared/1.0-bet
> a-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]
> > > [WARNING] No archetype repository found.
> > > [WARNING] Specified archetype not found.
> > > 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 service
> > project
> > > creation)
> > > 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
> > > archetype)
> > > 34: internal -> maven-archetype-har (Hibernate Archive)
> > > 35: internal -> maven-archetype-sar (JBoss Service Archive)
> > > 36: internal -> wicket-archetype-quickstart (A simple Apache 
> > > Wicket
> > > project)
> > > 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/24/25/26/27
/28/29/30/31/32/33/34/35/36):
> > >
> > >
> > > It did exactly the same thing!  Why has it ignored my selection of

> > > the archetype?  Why doesn't it try to download trails-archetype?  
> > > I can
> see
> > >
> > >
> >
> http://repo1.maven.org/maven2/org/trailsframework/trails-archetype/1.1
> .1/which
> > > looks to match the archetype specified pretty well.
> > >
> > > This looks a bit as though it might be related to issue MNG-3356, 
> > > but
> I
> > > don't have any other commons-cli installation:
> > >
> > > >apt-cache policy libcommons-cli-java
> > > libcommons-cli-java:
> > >  Installed: (none)
> > >  Candidate: 1.0-8
> > >  Version table:
> > >     1.0-8 0
> > >        500 http://au.archive.ubuntu.com gutsy/universe Packages
> > >
> > > and besides Maven looks like it has its own version built in:
> > >
> > > >jar tf /usr/local/apache-maven/lib/maven-2.0.8-uber.jar | grep
> > > commons/cli
> > > org/apache/commons/cli/
> > > org/apache/commons/cli/AlreadySelectedException.class
> > > org/apache/commons/cli/ParseException.class
> > > org/apache/commons/cli/CommandLine.class
> > > org/apache/commons/cli/Option.class
> > > org/apache/commons/cli/CommandLineParser.class
> > > org/apache/commons/cli/Options.class
> > > org/apache/commons/cli/OptionGroup.class
> > > org/apache/commons/cli/Parser.class
> > > org/apache/commons/cli/MissingOptionException.class
> > > org/apache/commons/cli/GnuParser.class
> > > org/apache/commons/cli/HelpFormatter$StringBufferComparator.class
> > > org/apache/commons/cli/HelpFormatter$1.class
> > > org/apache/commons/cli/HelpFormatter.class
> > > org/apache/commons/cli/MissingArgumentException.class
> > > org/apache/commons/cli/PatternOptionBuilder.class
> > > org/apache/commons/cli/PosixParser.class
> > > org/apache/commons/cli/TypeHandler.class
> > > org/apache/commons/cli/UnrecognizedOptionException.class
> > > org/apache/commons/cli/OptionBuilder.class
> > > org/apache/commons/cli/BasicParser.class
> > >
> > > What am I doing wrong???
> > >
> > > Tom
> > >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to