Book Image

Mastering Apache Maven 3

Book Image

Mastering Apache Maven 3

Overview of this book

Table of Contents (16 chapters)
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

The batch mode


The archetype plugin can operate in the batch mode either by setting the interactiveMode argument to false or passing -B as an argument. When operating in the batch mode, you need to clearly specify which archetype you are going to use with the arguments: archetypeGroupId, archetypeArtifactId, and archetypeVersion. Also, you need to clearly identify the resultant artifact with the groupId, artifactId, version, and package arguments, as follows:

$ mvn archetype:generate -B
                     -DarchetypeGroupId=org.apache.maven.archetypes
                     -DarchetypeArtifactId=maven-archetype-quickstart
                     -DarchetypeVersion=1.0 
                     -DgroupId=com.packt.samples  
                     -DartifactId=com.packt.samples.archetype 
                     -Dversion=1.0.0 
                     -Dpackage=com.packt.samples.archetype

Any inquisitive mind should be having a very valid question by now.

In the non-interactive mode, we did not type any...