adam bien's blog

Maven archetype:generate Tuning 📎

The mvn archetype:generate tries to fetch a remote catalog first:

[INFO] Generating project in Batch mode
[INFO] Archetype repository not defined. Using the one from [com.airhacks:javaee8-essentials-archetype:0.0.4] found in catalog remote    

In case the remote catalog is not available a previously installed archetype version is used. The flag -DarchetypeCatalog=local skips the remote lookup and significantly reduces the execution time.

The "tuned" Java EE / MicroProfile Essentials Archetype invocation resembles:

mvn -DarchetypeCatalog=local archetype:generate \
-DarchetypeGroupId=com.airhacks \
-DarchetypeArtifactId=javaee8-essentials-archetype
...and the QuarkEE archetype:

mvn -DarchetypeCatalog=local archetype:generate \
-DarchetypeGroupId=com.airhacks \
-DarchetypeArtifactId=quarkee-archetype \

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.