I was trying to run the following command:
mvn archetype:generate -D"groupId=com.example" -DartifactId="my-app" `
-D"archetypeArtifactId=maven-archetype-quickstart" `
-DarchetypeVersion="1.4" `
-D"interactiveMode=false" -X
In this simple command, it took around 2 minute to complete. The hotspot of the total time is here:
[INFO] Generating project in Batch mode
[DEBUG] Searching for remote catalog: https://repo.maven.apache.org/maven2/archetype-catalog.xml
The archetype-catalog.xml has 12.3M in file size and the network speed of the repo.maven.apache.org site is slow. So that the total run time become very long.
Does Apache Maven have any cache mechanism for this can increase the run speed?