Maven Archetype
  1. Maven Archetype
  2. ARCHETYPE-344

Cannot use local snapshot archetypes w/o -DarchetypeRepository=local

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Build https://svn.codehaus.org/mojo/trunk/mojo/mojo-archetypes/netbeans-platform-app-archetype and then:

      mvn -B -DarchetypeGroupId=org.codehaus.mojo.archetypes -DarchetypeArtifactId=netbeans-platform-app-archetype -DarchetypeVersion=1.7-SNAPSHOT -DgroupId=test -DartifactId=whatever -Dversion=1.0-SNAPSHOT org.apache.maven.plugins:maven-archetype-plugin:2.0:generate

      This will print a warning:

      [INFO] Archetype repository missing. Using the one from [org.codehaus.mojo.archetypes:netbeans-platform-app-archetype:1.6] found in catalog remote

      and then proceed to use the 1.6 archetype, even though 1.7-SNAPSHOT was explicitly requested, and is available in the local repository.

      When using 2.0-alpha-5 the same command works as expected, so this is a regression. Breaks usage of local archetype catalog from NB IDE.

      Workaround is to pass -DarchetypeRepository=local.

        Issue Links

          Activity

          Hide
          Jesse Glick added a comment -

          Similarly, if you ask to use an archetype available in Central but newer than the one in your local repo, the plugin prints e.g.

          mvn ... -DarchetypeVersion=1.6 ...
          ...
          Archetype repository missing. Using the one from [org.codehaus.mojo.archetypes:nbm-archetype:1.5] found in catalog remote
          

          and uses the wrong archetype.

          Show
          Jesse Glick added a comment - Similarly, if you ask to use an archetype available in Central but newer than the one in your local repo, the plugin prints e.g. mvn ... -DarchetypeVersion=1.6 ... ... Archetype repository missing. Using the one from [org.codehaus.mojo.archetypes:nbm-archetype:1.5] found in catalog remote and uses the wrong archetype.
          Hide
          Herve Boutemy added a comment - - edited

          fixed in r1039970

          Show
          Herve Boutemy added a comment - - edited fixed in r1039970
          Hide
          Jesse Glick added a comment -

          Please take a look at ARCHETYPE-366 if you have not done so already; I added a suggested patch.

          Show
          Jesse Glick added a comment - Please take a look at ARCHETYPE-366 if you have not done so already; I added a suggested patch.

            People

            • Assignee:
              Herve Boutemy
              Reporter:
              Jesse Glick
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: