What is an archetype?
A Maven project 'en devenir'
I.e. an abstract representation of a kind of project that can be instantiated into a concrete customized Maven project.
An archetype knows which files will be part of the instantiated project and which properties to fill to properly customize the project.
Each archetype defines a set of common properties:
groupIdwhich will be the groupId of the projectartifactIdwhich will be the artifactId of the projectversionwhich will be the version of the projectpackagewhich will be the base package for all source files of the project
A JAR file
The minimal content of the JAR file is:
.
|-- META-INF
| `-- maven
| `-- archetype-metadata.xml [1]
`-- archetype-resources
|-- ... [2]
`-- pom.xml [3]
- The metadata file that defines:
- the default values of the common properties
- a set of additional properties with their default values
- a set of archetype resources
- The resource files defined by the archetype metadata
- The POM file of a Maven project
Note: The common properties should be renamed to $target.groupId, ... to avoid name clash.



