Hello,

i was hopping there was some way to take my pack of maven.xml preGoal rule and just relocate them somewhere where maven2 would use them. You suggestion will not work. For our XSLT transform, we need to pass parameters to the xslt transform engine (for that we use saxon transformer with some specific transformation parameters), i don't see such equivalent in what you pointed me to nor is there information about version of xslt supported (1,2? we need 2).

For the dependency plugin we have to investigate, but if that mean we need to upgrade included project to maven 2 also, that's a no go. That project i have no write access to and we don't plan maven 2 for it, we just currently, in our build process, download it along our main project, and retrieve some files from it (files we patch on the fly using <ant:replace /> rules btw). We don't even build it, we only need it's webapp (jsp/pictures/html/config) files integrated in our app.


So, if we could keep our current build process rules (maven.xml), and just somehow move them in a plugin that would be lot's easier. Some of the jelly rules took time to implement, we don't have the time to recreate all them. Isn't it possible to take the maven.xml and put it in a project.jelly or it's maven2 equivalent?

I need some direction on how to easily convert from maven1 to maven2, related to maven.xml, but all link related to that in maven site seem dead (see my first mail)


En l'instant précis du 04/03/08 10:57, Samuel Le Berrigaud s'exprimait en ces termes:
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: http://maven.apache.org/plugins/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:
http://mojo.codehaus.org/xslt-maven-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.

SaM

On Tue, Mar 4, 2008 at 8:39 PM, David Delbecq <[EMAIL PROTECTED]> 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
http://maven.apache.org/guides/mini/guide-m1-m2.html , 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
David Delbecq
Institut Royal Météorologique
Ext:557


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to