Maven central is not used for archetype repository anymore
----------------------------------------------------------

                 Key: ARCHETYPE-351
                 URL: http://jira.codehaus.org/browse/ARCHETYPE-351
             Project: Maven Archetype
          Issue Type: Bug
          Components: Generator
    Affects Versions: 2.0
         Environment: OS X, maven 3.
            Reporter: Ronny Løvtangen


In maven 2.2.1, the following command would create a Grails 1.3.4 project, 
using the archetype at 
http://repo1.maven.org/maven2/org/grails/grails-maven-archetype/1.3.4/
{code}
mvn archetype:generate -DarchetypeGroupId=org.grails \
    -DarchetypeArtifactId=grails-maven-archetype \
    -DarchetypeVersion=1.3.4 \
    -DgroupId=example -DartifactId=my-app
{code}

In maven 3, this doesn't happen, and a Grails 1.2.0 project is created instead, 
causing confusion.
{code}
[INFO] Archetype repository missing. Using the one from 
[org.grails:grails-maven-archetype:1.2.0] found in catalog remote
{code}
This single line output is easily overlooked.

Adding -DarchetypeRepository=http://repo1.maven.org/maven2 does the trick in 
maven 3, but I expected maven central to be default enabled?

One of the features of maven 3 is backward compatibility with maven 2. Is this 
change intentional?
I think the command should fail when the explicit given version is not found, 
not just use an old version.
And maven central should be used like in maven 2, to preserve backwards 
compatibility, and support 'principle of least surprise' as maven central is 
default enabled for other dependencies.


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