Fork me on GitHub

As of Maven Archetype Plugin 3.0.0 the archetype resolution has changed. It is not possible anymore to specify the repository via the commandline, but instead the repositories as already specified for Maven are used. This means that also the mirrors and proxies are respected, as well as the authentication on repositories.

If you're not using a repository manager and the archetype is available at Maven Central, there's nothing you have to do.

If you're using a repository manager and the archetype is available via this manager, there's nothing you have to do.

Only in case of a third party archetype which is not managed by a repository you have to add a repository entry to your settings.xml once:

<settings>
  <mirrors>
    <mirror>
      <id>mrm-maven-plugin</id>
      <name>Mock Repository Manager</name>
      <url>http://www.mycompany.com/maven-reporistory-manager</url>
      <mirrorOf>*,!archetype</mirrorOf>
    </mirror>
  </mirrors>
  
  <!--
  <servers>
    <server>
      <id>archetype</id>
      <username/>
      <password/>
    </server>
  </servers>
  -->
  
  <profiles>
    <profile>
      <id>acme</id>
      <repositories>
        <repository>
          <id>archetype</id>
          <url>https://www.acme.com/repo</url>
          <releases>
            <enabled>true</enabled>
            <checksumPolicy>fail</checksumPolicy>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <checksumPolicy>warn</checksumPolicy>
          </snapshots>
        </repository>
      </repositories>
    </profile>
  </profiles>
</settings>