Any comment really ?

Raphaël

2006/11/28, Raphaël Piéroni <[EMAIL PROTECTED]>:

Hi,

I have a plugin proposition around archetype, any tought ?

Some of the features would need some changes in settings.xml

Raphaël



The proposed plugin defines some goals calling specific lifecycles mapped
on internal (to the plugin) goals.

public goals:

   1. define-project,
   2. generate-project,
   3. clean-project.

internal goals:

   1. select-archetype,
   2. define-archetype-properties,
   3. show-archetype-pom,
   4. generate-archetype-project,
   5. clean-archetype-properties.

define-project public goal This goal calls an internal lifecylce with the
internal goals:

   1. select-archetype,
   2. define-archetype-properties,
   3. show-archetype-pom.

generate-project public goal This goal calls an internal lifecycle with
the internal goals:

   1. show-archetype-pom,
   2. generate-archetype-project.

clean-project public goal This goal calls an internal lifecycle with the
internal goals:

   1. clean-archetype-properties.

select-archetype internal goal This goal:

   - collects the archetypes from local repository and remote
   repository.
   - uses a archetypeGroup property similar to pluginGroup.
   - displays a list of the collected archetypes and let the user
   choose one.
   - finishes by writing the selected archetype reference
   (groupId:artifactId:version) in the archteype.properties file.

If the archetype.properties file exist before the selection, the defined
archetype reference is used as default value. define-archetype-properties
internal goal This goal:

   - reads the archetype reference from the archetype.properties file.
   - reads the archetype.xml (in MEAT-INF/maven/ of archetype artifact)
   for required and optional properties.
   - reads the archetypes.properties file to find already defined
   required and optional properties.
   - ask user for all the required properties (using the properties
   defined in archetype.properties as default values).
   - save the archetype.properties file with the newly defined
   properties both required and optional.

show-archetype-pom internal goal This goal:

   - reads the archetype reference and the archetype properties from
   the archetype.properties file.
   - calls the archetype plugin to generate only the project's pom in
   the target directory.
   - display the generate target/pom.xml file to the screen.

Use timestamp on archetype.properties and target/pom.xml files to not call
teh generation generate-archetype-project internal goal This goal:

   - reads the archetype reference and the archetype properties from
   the archetype.properties file.
   - calls the archetype plugin to generate only the project's pom in
   the target directory.

clean-archetype-properties internal goal This goal:

   - removes all the archetype.properties lines but the archetype
   reference.



Reply via email to