Error executing Maven archetype generate command to create a Opendaylight project structure

With maven-archetype-plugin 3.x it is not possible anymore to specify the repository as commandline argument (for consistency and security reasons).

So you have 2 options:

  • Follow the new instructions
  • Lock the version of the plugin to 2.4

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. 1.You would to delete -DarchetypeCatalog & -DarchetypeRepository 2. In your .m2/setting.xml, add

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

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

  <activeProfiles>
    <activeProfile>acme</activeProfile>
  </activeProfiles>
</settings>
  1. Look at http://maven.apache.org/archetype/maven-archetype-plugin/archetype-repository.html