You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Raphaël Piéroni <ra...@gmail.com> on 2006/11/28 23:56:34 UTC

[Archetype] proposition of a wrapper plugin

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.

Re: [Archetype] proposition of a wrapper plugin

Posted by Wendy Smoak <ws...@gmail.com>.
On 12/1/06, Raphaël Piéroni <ra...@gmail.com> wrote:

> Any comment really ?

You probably won't get much interest until there is some code to play
with.  Is this something you need?  Then write it, and if it attracts
interest and is useful for someone else, that's a bonus.

As an example, Don Brown was frustrated with the archetype plugin, so
he wrote a front end called "Archy" and posted an announcement about
it on the user list.

   http://www.nabble.com/-ANN--Archy---a-simple-frontend-to-archetypes-t2016457.html

   http://docs.codehaus.org/display/MAVENUSER/Archetypes+List

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [Archetype] proposition of a wrapper plugin

Posted by Raphaël Piéroni <ra...@gmail.com>.
Any comment really ?

Raphaël

2006/11/28, Raphaël Piéroni <ra...@gmail.com>:
>
> 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.
>
>
>