maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samuel Le Berrigaud" <>
Subject Re: upgrade from maven 1 to maven 2
Date Tue, 04 Mar 2008 09:57:02 GMT
Hi David,

You don't to implement your whole maven.xml into one maven2 plugin. Instead
you should decompose what you do in your maven.xml and find out the existing
maven 2 plugins that would enable those different tasks.

For example, if I take your two examples below:
- copying resources of another project:
I would make that project a dependency of your web application and that
would be sufficient to add those on your classpath.
If you need them outside the classpath, I would probably use the maven
dependency plugin:
using the unpack goal, it will unpack the jar wherever you need to. I would
attach that to the "process-resources" phase of you war module.

- xslt transformation
that should be fairly easy using the XSLT plugin:
attaching it to the same "process-resources" phase.

Hope this all make sense. I strongly advise researching existing plugins
before writing your own. All the configuration will go in your pom.xml so as
with the maven.xml you can update those rules easily.


On Tue, Mar 4, 2008 at 8:39 PM, David Delbecq <> wrote:

> Hello,
> we have a few project here using maven 1. They become difficult to
> maintain when it come to using new plugins that are not available for
> maven 1. So we thought it might be time to switch to maven 2. Question
> is, considering about all projects are using preGoal/postGoal and
> personalized rules in maven.xml, what should i do with them? I read
> there is no equivalent of maven.xml, i need to use a plugin. Can I sort
> of embbed that plugin with the project that use it, or do i need to
> create a separate plugin project for each of our maven.xml, compile and
> deploy those plugin change everytime before compiling the main project
> (with maven 1, changes to maven.xml were immediate)? Also if someone can
> point me to documentation about converting that maven.xml to a plugin,
> it'll be great. Documentation here
> , section "what to
> do with maven.xml" point to error page (the pages seems to have been
> removed from maven site :( )
> example of such task of maven.xml here is, we have a project X that is a
> webapp. In a subdirectory of that webapp we need to copy all ressources
> of another project Y, and we need to merge the struts and web.xml
> configs (we use a xslt processor for that). Am not sure how easy that
> can be transfered to a plugin...
> --
> David Delbecq
> Institut Royal Météorologique
> Ext:557
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Samuel Le Berrigaud
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message