Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
mvn archetype:generate -B \
                       -DgroupId=tutorial \
                       -DartifactId=tutorial \
                       -DarchetypeGroupId=org.apache.struts \
                       -DarchetypeArtifactId=struts2-archetype-blank \
                       -DarchetypeVersion=2.1.6

Archetype Parameters

The -B option runs archetype:generate in batch mode; it avoids a prompt to confirm our settings.

Parameter

Description

groupId

The id for the group the application belongs to. Usually is the root package for applications in your company, e.g. com.mycompany

artifactId

The id for the project. The project will be created a sub-directory named after this parameter.

archetypeGroupId

The group id of the archetype. Will always be org.apache.struts for Struts archetypes

archetypeArtifactId

The id of the archetype

archetypeVersion

The version of the archetype

package

(Optional) The base Java package to use for generated source code. Defaults to archetypeGroupId if not specified.

remoteRepositories

(Optional) A list of remote repositories that contain the archetype.

...