How to avoid download remote archetype-catalog.xml on every run?

Viewed 10

Every time I try to run mvn archetype:generate, the longest wait time is downladoing the https://repo.maven.apache.org/maven2/archetype-catalog.xml catalog file. Even the archetype I always used just recently. It still have to download remote archetype catalog file every time.

mvn archetype:generate -B `
  '-DgroupId=com.example' `
  '-DartifactId=app1' `
  '-Dversion=1.0-SNAPSHOT' `
  '-DarchetypeGroupId=org.apache.maven.archetypes' `
  '-DarchetypeArtifactId=maven-archetype-quickstart' `
  '-DarchetypeVersion=1.4'

enter image description here

Is it possible to enable cache or something to increase the speed of each run?

0 Answers
Related