mvn archetype:generate is failing to download needed archetype artifacts
------------------------------------------------------------------------

                 Key: ARCHETYPE-159
                 URL: http://jira.codehaus.org/browse/ARCHETYPE-159
             Project: Maven Archetype
          Issue Type: Bug
          Components: Archetypes
         Environment: Windows XP, Maven 2.0.9
            Reporter: Glen Mazza


A fresh install of Maven 2.0.9 on Windows XP, if I issue this command:

mvn archetype:generate -DarchetypeArtifactId=maven-archetype-quickstart

I get this error message:
[INFO] The desired archetype does not exist 
(org.apache.maven.archetypes:maven-archetype-quickstart:1.0)

Partial error stack:
[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]
org.apache.maven.archetype.downloader.DownloadNotFoundException: Requested downl
oad does not exist.
        at org.apache.maven.archetype.downloader.DefaultDownloader.download(Defa
ultDownloader.java:62)
        at org.apache.maven.archetype.common.DefaultArchetypeArtifactManager.exi
sts(DefaultArchetypeArtifactManager.java:310)
        at org.apache.maven.archetype.ui.DefaultArchetypeGenerationConfigurator.
configureArchetype(DefaultArchetypeGenerationConfigurator.java:103)

The same error also happens with an archetype artifact ID of 
"maven-archetype-webapp" (and probably all the others as well).

However, if I issue the same command but using archetype:create instead of 
:generate, not only will the archetype artifact correctly download (and the 
command work successfully), subsequent usages of archetype:generate with that 
same archetype artifact will also correctly run.

So I think the problem is that mvn archetype:generate needs to download 
archetype artifacts just like mvn archetype:create does.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to