ArchetypeDescriptor

This is a reference for the Archetype descriptor used to describe archetypes's metadata.

The metadata about an archetype is stored in the archetype-metadata.xml file located in the META-INF/maven directory of its jar file.

<archetype-descriptor xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
  name=.. partial=.. >
  <requiredProperties>
    <requiredProperty key=.. >
      <defaultValue/>
    </requiredProperty>
  </requiredProperties>

  <fileSets>
    <fileSet filtered=.. packaged=.. encoding=.. >
      <directory/>
      <includes/>
      <excludes/>
    </fileSet>
  </fileSets>

  <modules>
    <module id=.. dir=.. name=.. >

      <fileSets>
        <fileSet filtered=.. packaged=.. encoding=.. >
          <directory/>
          <includes/>
          <excludes/>
        </fileSet>
      </fileSets>

      <modules>
        <module>...recursion...<module>
      </modules>
    </module>
  </modules>
</archetype-descriptor>

archetype-descriptor

No description.

Attribute Type Description
name String Name of the Archetype, that will be displayed to the user when choosing an archetype.
partial boolean Is this archetype representing a full Maven project or only parts?
Default value is: false.
Element Type Description
requiredProperties/requiredProperty* List<RequiredProperty> (Many) List of required properties to generate a project from this archetype.
fileSets/fileSet* List<FileSet> (Many) File sets definition.
modules/module* List<ModuleDescriptor> (Many) Modules definition.

requiredProperty

Definition of a property required when generating a project from this archetype.

Attribute Type Description
key String Key value of the property.
Element Type Description
defaultValue String Default value of the property.

fileSet

A fileset defines the way the project's files located in the jar file are used by the Archetype Plugin to generate a project. If file or directory name contains __property__ pattern, it is replaced with corresponding property value.

Attribute Type Description
filtered boolean Filesets can be filtered, which means the selected files will be used as Velocity templates. They can be non-filtered, which means the selected files will be copied without modification.
Default value is: false.
packaged boolean Filesets can be packaged, which means the selected files will be generated/copied in a directory structure that is prepended by the package property. They can be non-packaged, which means that the selected files will be generated/copied without that prepend.
Default value is: false.
encoding String Encoding to use when filtering content.
Element Type Description
directory String The directory where the files will be searched for, which is also the directory where the project's files will be generated.
includes/include* List<String> (Many) Inclusion definition "à la" Ant.
excludes/exclude* List<String> (Many) Exclusion definition "à la" Ant.

module

No description.

Attribute Type Description
id String The module's artifactId.
dir String The module's directory.
name String The module's name.
Element Type Description
fileSets/fileSet* List<FileSet> (Many) File sets definition.
modules/module* List<ModuleDescriptor> (Many) Modules definition.