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

Cannot use "-DarchetypeRepository" if you have <mirrors> * in your settings.xml file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.0-alpha-3
    • None
    • Creator, Generator
    • None
    • Java 6
      Maven 2.0.9

    Description

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            jeffcampbell Jeff Campbell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: