[ 
http://jira.codehaus.org/browse/ARCHETYPE-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Arnaud Heritier updated ARCHETYPE-159:
--------------------------------------

    Attachment: ARCHETYPE-159-3.patch

It's a first patch for this bug.
There's no test, I didn't yet find how to add one for this problem.
I changed 2 things to fix the problem : 
 - I passed remoteRepositories list from the plugin to the Downloader
 - I removed a suspect code on the the Downloader. I don't understand why you 
change the repository of the artifact. I you uncomment this, the bug comes 
back. Same thing with repositories list.

> 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
>    Affects Versions: 2.0-alpha-2
>         Environment: Windows XP, Maven 2.0.9
>            Reporter: Glen Mazza
>            Priority: Blocker
>         Attachments: ARCHETYPE-159-3.patch
>
>
> 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