Maven Archetype Plugin with 3rd Party (Snapshot) Repository

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Maven Archetype Plugin with 3rd Party (Snapshot) Repository

Andreas Schaefer
Hi

I try to list our Archetypes from a 3rd Party Snapshot Repository (https://oss.sonatype.org/content/repositories/snapshots) on maven-archetype-plugin version 3.0.1.

For that I created this in my settings.xml file:

<profile>
        <id>archetype</id>
        <repositories>
          <repository>
            <id>archetype</id>
            <url>https://oss.sonatype.org/content/repositories</url>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <layout>default</layout>
            <releases>
              <enabled>false</enabled>
              <checksumPolicy>warn</checksumPolicy>
            </releases>
            <snapshots>
              <enabled>true</enabled>
              <checksumPolicy>warn</checksumPolicy>
            </snapshots>
          </repository>
        </repositories>
      </profile>

If I call the generation with ‘mvn archetype:generate -s ../my-settings.xml -P archetype’ it will only list the archetype on central.

I debug the code and saw that the plugin tries to find the remote repository with the name ‘archetype’ but Maven would only list central as remote repository no matter what I configure.

Any idea how to make this work?

Thanks - Andy Schaefer