Full name:
org.apache.maven.plugins:maven-archetype-plugin:2.2:create-from-project
Description:
Creates an archetype project from the current project.
This goal reads your source and resource files, the values of its parameters, and properties you specify in a .property file, and uses them to create a Maven archetype project using the maven-archetype packaging. If you build the resulting project, it will create the archetype. You can then use this archetype to create new projects that resemble the original.
The maven-archetype-plugin uses Velocity to expand template files, and this documentation talks about 'Velocity Properties', which are values substituted into Velocity templates. See The Velocity User's Guide for more information.
This goal modifies the text of the files of the current project to form the Velocity template files that make up the archetype.
Note that you may need to edit the results of this goal. This goal has no way to exclude unwanted files, or add copyright notices to the Velocity templates, or add more complex elements to the archetype metadata file.
This goal also generates a simple integration-test that exercises the generated archetype.
Attributes:
Name | Type | Since | Description |
---|---|---|---|
archetypeFilteredExtentions | String | - | File extensions which are checked for project's text files (vs
binary files). |
archetypeLanguages | String | - | Directory names which are checked for project's sources main
package. |
archetypePostPhase | String | - | The property telling which phase to call on the generated
archetype. Interesting values are: package,
integration-test, install and
deploy. Default value is: package. |
archetypeRegistryFile | File | - | The location of the registry file. |
defaultEncoding | String | - | Velocity templates encoding. Default value is: UTF-8. |
interactive | boolean | - | Enable the interactive mode to define the archetype from the
project. Default value is: false. |
keepParent | boolean | - | POMs in archetype are created with their initial parent. This
property is ignored when preserveCData is true. |
outputDirectory | File | - | The directory where the archetype should be created. |
packageName | String | - | The package name for Java source files to be incorporated in the
archetype and and relocated to the package that the user selects. |
partialArchetype | boolean | - | Create a partial archetype. |
preserveCData | boolean | - | Create pom's velocity templates with CDATA preservation. This uses
the String.replaceAll() method and risks to have some
overly replacement capabilities (beware of '1.0' value). |
propertyFile | File | - | The property file that holds the plugin configuration. If this is
provided, then the plugin reads properties from here. The
properties in here can be standard properties listed below or
custom properties for this archetype. The standard properties are
below. Several of them overlap parameters of this goal; it's better
to just set the parameter.
Custom properties allow you to replace some constant values in the project's files with Velocity macro references. When a user generates a project from your archetype he or she gets the opportunity to replace the value from the source project. Custom property names may not contain the '.' character. For example, if you include a line like the following in your property file: cxf-version=2.5.1-SNAPSHOT 2.5.1-SNAPSHOT cxf-version cxf-version requiredProperty 2.5.1-SNAPSHOT |
testMode | boolean | - | (no description) |
Custom properties allow you to replace some constant values in the project's files with Velocity macro references. When a user generates a project from your archetype he or she gets the opportunity to replace the value from the source project.
Custom property names may not contain the '.' character.
For example, if you include a line like the following in your property file:
cxf-version=2.5.1-SNAPSHOT
2.5.1-SNAPSHOT
cxf-version
cxf-version
requiredProperty
2.5.1-SNAPSHOT