I wanted to create a maven project using "mvn archetype:generate ..." to create a maven project Skeleton. I looked up online and come up with this:
in settings.xml
<profile>
<id>PlatMigr</id>
<repositories>
<repository>
<id>internal repo</id>
<name>IT Maven Central</name>
<url>https://<internal maven repo></url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
From command line:
mvn archetype:generate -DarchetypeCatalog=internal -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.mycompany.myproj -DartifactId=ProjName
However maven still tried to download artifacts from official central maven repo:
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
We have a firewall installed to stop internet access, that's why I struggle to use internal repo in the first place. Anyone can advise on how to setup and use internal repo to create maven projects?
Edit you settings.xml in m2_home, add mirror to you nexus and create & set to active profile without central repositories