archetype:generate
Full name:
org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate
Description:
Generates a new project from an archetype, or updates the actual
project if using a partial archetype. If the project is fully
generated, it is generated in a directory corresponding to its
artifactId. If the project is updated with a partial archetype, it
is done in the current directory.
Attributes:
- Invokes the execution of the lifecycle phase generate-sources prior to executing itself.
Required Parameters
Name |
Type |
Since |
Description |
interactiveMode |
Boolean |
- |
User settings used to check the interactiveMode. Default value is: ${settings.interactiveMode}. User property is: interactiveMode. |
Optional Parameters
Name |
Type |
Since |
Description |
archetypeArtifactId |
String |
- |
The archetype's artifactId. User property is: archetypeArtifactId. |
archetypeCatalog |
String |
- |
The archetype catalogs to use to build a list and let the user
choose from. It is a comma separated list of catalogs. Catalogs use
the following schemes:
- 'local' which is the shortcut to the local
repository
- 'remote' which is the shortcut for Maven Central
repository or its mirror
- 'internal' which is an internal catalog
If you want the catalogs to come from a different repository,
please add the following to your settings.xml
<repository>
<id>archetype</id>
<url>https://repository.domain.com/path/to/repo/</url>
</repository>
<!-- in case of a repository with authentication -->
<server>
<id>archetype</id>
<username>user.name</username>
<password>s3cr3t</password>
</server>
If Maven Central repository catalog file is empty,
internal catalog is used instead. Default value is: remote,local. User property is: archetypeCatalog. |
archetypeGroupId |
String |
- |
The archetype's groupId. User property is: archetypeGroupId. |
archetypeVersion |
String |
- |
The archetype's version. User property is: archetypeVersion. |
basedir |
File |
- |
(no description) Default value is: ${basedir}.
|
filter |
String |
2.1 |
Applying some filter on displayed archetypes list: format is
artifactId or groupId:artifactId.
- org.apache: -> displays all archetypes which
contain org.apache in groupId
- :jee or jee -> displays all
archetypes which contain jee in artifactId
- org.apache:jee -> displays all archetypes which
contain org.apache in groupId AND jee in artifactId
User property is: filter. |
goals |
String |
- |
Goals to immediately run on the project created from the archetype. User property is: goals. |
Parameter Details
archetypeArtifactId:
The archetype's artifactId.
- Type: java.lang.String
- Required: No
- User Property: archetypeArtifactId
archetypeCatalog:
The archetype catalogs to use to build a list and let the user
choose from. It is a comma separated list of catalogs. Catalogs use
the following schemes:
- 'local' which is the shortcut to the local
repository
- 'remote' which is the shortcut for Maven Central
repository or its mirror
- 'internal' which is an internal catalog
If you want the catalogs to come from a different repository,
please add the following to your
settings.xml
<repository>
<id>archetype</id>
<url>https://repository.domain.com/path/to/repo/</url>
</repository>
<!-- in case of a repository with authentication -->
<server>
<id>archetype</id>
<username>user.name</username>
<password>s3cr3t</password>
</server>
If Maven Central repository catalog file is empty,
internal catalog is used instead.
- Type: java.lang.String
- Required: No
- User Property: archetypeCatalog
- Default: remote,local
archetypeGroupId:
The archetype's groupId.
- Type: java.lang.String
- Required: No
- User Property: archetypeGroupId
archetypeVersion:
The archetype's version.
- Type: java.lang.String
- Required: No
- User Property: archetypeVersion
basedir:
(no description)
- Type: java.io.File
- Required: No
- Default: ${basedir}
filter:
Applying some filter on displayed archetypes list: format is
artifactId or
groupId:artifactId.
- org.apache: -> displays all archetypes which
contain org.apache in groupId
- :jee or jee -> displays all
archetypes which contain jee in artifactId
- org.apache:jee -> displays all archetypes which
contain org.apache in groupId AND jee in artifactId
- Type: java.lang.String
- Since: 2.1
- Required: No
- User Property: filter
goals:
Goals to immediately run on the project created from the archetype.
- Type: java.lang.String
- Required: No
- User Property: goals
interactiveMode:
User settings used to check the interactiveMode.
- Type: java.lang.Boolean
- Required: Yes
- User Property: interactiveMode
- Default: ${settings.interactiveMode}