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

Raphaël Piéroni closed ARCHETYPE-176.
-------------------------------------

    Resolution: Not A Bug

Using "mirrorOf central
" in my settings.xml and pointing to my nexus,
I had the following behaviour, which is intended. Maven downloads from the 
intended repository.

C:\Devs\integration-tests\proficio-usage>mvn archetype:generate 
-DarchetypeRepository=http://somewhere.net -DarchetypeGroupId=ogr.aze.rez 
-DarchetypeArtifactId=aqd -DarchetypeVersion=5

[INFO] [archetype:generate]

[INFO] Generating project in Interactive mode

[INFO] Archetype defined by properties

Downloading: http://somewhere.net/ogr/aze/rez/aqd/5/aqd-5.jar

57K downloaded

[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 
'8f1f4c7559e3edc224cac5bd3c4f7fc55d308101'; remote = '<!DOCTYPE' - RETRYING

Downloading: http://somewhere.net/ogr/aze/rez/aqd/5/aqd-5.jar

57K downloaded

[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 
'fae62c29661cf18998c443c0c05ae2be365cadb8'; remote = '<!DOCTYPE' - IGNORING

[INFO] ------------------------------------------------------------------------

[ERROR] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] : 
org.apache.maven.archetype.exception.ArchetypeGenerationConfigurationFailure: 
The defined artifact is not an archetype





Using "mirrorOf *
" in my settings,
I had the following behaviour, which also is intended. my nexus doesn't proxy
somewhere.net as a repository.

C:\Devs\integration-tests\proficio-usage>mvn archetype:generate 
-DarchetypeRepository=http://somewhere.net -DarchetypeGroupId=ogr.aze.rez 
-DarchetypeArtifactId=456aqd -DarchetypeVersion=556

[INFO] [archetype:generate]

[INFO] Generating project in Interactive mode

[INFO] Archetype defined by properties

Downloading: 
http://localhost:8081/nexus/content/groups/public/ogr/aze/rez/456aqd/556/456aqd-556.jar

Downloading: 
http://localhost:8081/nexus/content/groups/public/ogr/aze/rez/456aqd/556/456aqd-556.jar

[INFO] ------------------------------------------------------------------------

[ERROR] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] : org.apache.maven.archetype.exception.UnknownArchetype: The desired 
archetype does not exist (ogr.aze.rez:456aqd:556)



As a conclusion one could think "mirrorOf *" is over zealous. 
Maybe by selecting the mirrors and which repositories are proxied in nexus
this problem could be avoided.



> Cannot use "-DarchetypeRepository" if you have <mirrors> * in your 
> settings.xml file
> ------------------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-176
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-176
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Creator, Generator
>    Affects Versions: 2.0-alpha-3
>         Environment: Java 6
> Maven 2.0.9
>            Reporter: Jeff Campbell
>
> I'm using the following command to create a new project from a custom 
> archetype from a 3rd party Maven repo (only
> the relevant portion of the command is below):
> mvn archetype:generate -DarchetypeRepository=http://somehost.com/mvnrepo 
> .....(other -D params for thecustom archetype)...
> But, because I have the following in my settings.xml file, I cannot
> access the repository specified by the "-DarchetypeRepository":
>     <mirrors>
>         <mirror>
>             <id>my.nexus</id>
>             <name> Nexus Mirror</name>
>             <url>http://somehost:8081/nexus/content/groups/public</url>
>             <mirrorOf>*</mirrorOf>
>         </mirror>
>     </mirrors>
> Work around(s):
> 1. Don't use <mirrors> section all together in the settings.xml file. 
> 2. List every single possible maven repo site mirror, in Nexus, that I can 
> possibly think of to hopefully cover every possible custom archetype that 
> will ever be used? (yikes!)

-- 
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