Uploaded image for project: 'Maven Archetype'
  1. Maven Archetype
  2. ARCHETYPE-351

Maven central is not used for archetype repository anymore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.1
    • Generator
    • None
    • OS X, maven 3.

    Description

      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/

      mvn archetype:generate -DarchetypeGroupId=org.grails \
          -DarchetypeArtifactId=grails-maven-archetype \
          -DarchetypeVersion=1.3.4 \
          -DgroupId=example -DartifactId=my-app
      

      In maven 3, this doesn't happen, and a Grails 1.2.0 project is created instead, causing confusion.

      [INFO] Archetype repository missing. Using the one from [org.grails:grails-maven-archetype:1.2.0] found in catalog remote
      

      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.

      Attachments

        Issue Links

          Activity

            People

              hboutemy Herve Boutemy
              ronnylovtangen Ronny Løvtangen
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: