Versions Compared

Key

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

...

From a working directory for your project, run the following command:

Code Block
mvn archetype:create generate  -DgroupId=tutorial \
                       -DartifactId=tutorial \
                       -DarchetypeGroupId=org.apache.struts \
                       -DarchetypeArtifactId=struts2-archetype-starterblank \
                       -DarchetypeVersion=2.0.11.2 

This table describes the parameters used above:

1.6

Archetype Parameters

Parameter Name

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

A list of remote repositories that contain the archetype. If deployed to the standard Maven repository or locally, this is optional

...