Fork me on GitHub

What is done during the creation of an archetype?

Property resolution

First, the Archetype Plugin asks the user to provide the common properties' values (archetype.groupId, archetype.artifactId, archetype.version, groupId, artifactId, version, package).

Then it asks for additional properties.

Archetype creation

Using the project's directory as sources, filteredExtensions and languages properties, the module tree; the Archetype Plugin searches for relevant filesets indexed by module.

Using the relevant filesets, the module tree, the resolved properties; the Archetype Plugin creates the archetype's resources.

Then it creates the archetype's descriptor.

Finishing by creating the POM for the archetype as a project.

Archetype testing

If you are creating an archetype from existing project all the tests from src/it/projects folder will be executed at this point.

Archetype installation

Optionally, after creating the archetype, the Archetype Plugin installs the archetype in the local repository. And it updates the local catalog.

Archetype deployment

Optionally, after installing the archetype, the Archetype Plugin deploys the archetype to the remote repository.

Interactive mode

The default behaviour is to operate in batch mode. The interactive mode is optionally used.

Advanced batch mode

In batch mode, the additional properties can only be defined using a property file. This file can also contain the other properties, both the common and filteredExtensions and languages.

Fileset resolution

In each module's directory and excluding submodules trees, the Archetype Plugin sorts the files by languages, filteredExtensions and sensible default base paths (src/main/languages, src/main/siblings, src/test/languages, src/test/siblings, ...).

This defines a three-dimensional matrix. Each sorted group (matrix' cases) becomes a resolved fileset.