You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by je...@accenture.com on 2007/01/22 10:30:05 UTC

develop custom plugin

Hi Maven users,

 

I want to write a plugin but I don't know if I got the correct approach.

Maybe someone can help me to do this correctly.

 

I've got a network drive where all local builds are stored.

It consists of multiple build maps. The names of the maps are generated
with the build number and a timestamp.

The build maps contain a few jars and the project javadoc.

All this is done by ant scripts for the moment.

 

Now I want to write a maven plugin to take care of this.

I had the following in mind.

 

Build.bat

Mvn myplugin:directories

==>     The POM of my plugin will contain a dependency of the
build-number-plugin
(http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/install.ht
ml).
I will generate a build number containing a number and a timestamp
(build 001 - 22 01 2007). This should not be a problem.
I will make the generated build-number available in my plugin by means
of a parameter, and I will create a dir with the build number.

Mvn package

==>     compile the source code and create the jars.

Mvn site

==>     create the documentation.

Mvn myplugin:export

==>     this goal needs to copy all the jars and documentation to the
directory created in the myplugin:directories goal.
The source code of this goal gets 2 parameters: the source dir and the
target dir.

==>     !!!!!!! Issues: I need to have the target dir that was created
in the directories goal of my plugin. How can I obtain this ?

Tag in SVN

==>     I want to tag the code in subversion with the build number
generated in the directories goal.

==>     !!!!!!! Issues: I need to have the build number that was
generated in the directories goal of my plugin. How can I do this ?

 

So this is what I had in mind.

Are there better ways to do all this?

Or is it possible to write one plugin that contains all commands, even
the package and site goals?

Is my approach correct, or how would you do this?

 

 

 

Kind regards



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.