You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by david delbecq <da...@oma.be> on 2008/03/12 23:11:59 UTC
Adding "goals" to pom.xml
Hello,
still in process of upgrading to maven2 here :)
Most of the work is taking good shape, thanks to informations on this ML.
I have a question regarding a few of our goals.
We have, for a war project, added a few goals that quickly do a copy of
a part of webapp to tomcat (instead of building war or even compile).
This is a way to allow easy test of jsp / pictures / css. Just patch a
life tomcat with new files. We do this with such a command in maven 1
maven debug_deploy:jsp
maven debug_deploy:resources
those goals are just simple ant copy tasks in maven.xml.
What would be the recommanded way to convert this. Should i create a
custom plugin that adds those targets to maven2, and include plugin in
pom.xml, or is there a way to add targets to pom.xml? Should i use the
ant plugin, but then how do i link it to a target instead of a phase?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Adding "goals" to pom.xml
Posted by ni...@planet.nl.
I know the tomcat plugin can turn your src/main/webapp into a exploded tomcat project. So every change to jsp files will be picked up without having to do anything.
Deploying an in-place WAR directory
To avoid copying resources to the build directory, the webapp source directory can be deployed to Tomcat by typing:
mvn war:inplace tomcat:inplace
http://mojo.codehaus.org/tomcat-maven-plugin/deployment.html#Deploying%20an%20in-place%20WAR%20directory
Hth,
Nick S.
-----Original Message-----
From: David Delbecq [mailto:delbd@oma.be]
Sent: Thu 3/13/2008 15:05
To: Maven Users List
Subject: Re: Adding "goals" to pom.xml
Hi Stefan,
Was not going to ignore your previous response. It just doesn't seem to
be any existing plugin that take a part of your webapp and life copy it
to a test tomcat somewhere. Moreover, that would be an operation outside
of compilation process (it's just a helper script so we don't have to do
it by hand when debugging and don't have to go to full war generation ^^)
regards
David Delbecq
En l'instant précis du 13/03/08 13:31, VUB Stefan Seidel s'exprimait en
ces termes:
> Hi David,
>
> have a look at the plugin lists from maven.apache.org and
> mojo.codehaus.org. There you will find a lot of plugins that do
> difficult work for you. The antrun plugin is of course good for
> backward compatibility, but I think there are better plugins if you
> just need to copy a file. Search the mailing list archives for my
> previous posts on that topic.
>
> regard,
>
> Stefan
>
> david delbecq wrote:
>> Hello,
>>
>> still in process of upgrading to maven2 here :)
>>
>> Most of the work is taking good shape, thanks to informations on this
>> ML.
>>
>> I have a question regarding a few of our goals.
>>
>> We have, for a war project, added a few goals that quickly do a copy
>> of a part of webapp to tomcat (instead of building war or even
>> compile). This is a way to allow easy test of jsp / pictures / css.
>> Just patch a life tomcat with new files. We do this with such a
>> command in maven 1
>>
>>
>> maven debug_deploy:jsp
>> maven debug_deploy:resources
>>
>> those goals are just simple ant copy tasks in maven.xml.
>>
>> What would be the recommanded way to convert this. Should i create a
>> custom plugin that adds those targets to maven2, and include plugin
>> in pom.xml, or is there a way to add targets to pom.xml? Should i use
>> the ant plugin, but then how do i link it to a target instead of a
>> phase?
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
--
David Delbecq
Institut Royal Météorologique
Ext:557
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Adding "goals" to pom.xml
Posted by David Delbecq <de...@oma.be>.
Hi Stefan,
Was not going to ignore your previous response. It just doesn't seem to
be any existing plugin that take a part of your webapp and life copy it
to a test tomcat somewhere. Moreover, that would be an operation outside
of compilation process (it's just a helper script so we don't have to do
it by hand when debugging and don't have to go to full war generation ^^)
regards
David Delbecq
En l'instant précis du 13/03/08 13:31, VUB Stefan Seidel s'exprimait en
ces termes:
> Hi David,
>
> have a look at the plugin lists from maven.apache.org and
> mojo.codehaus.org. There you will find a lot of plugins that do
> difficult work for you. The antrun plugin is of course good for
> backward compatibility, but I think there are better plugins if you
> just need to copy a file. Search the mailing list archives for my
> previous posts on that topic.
>
> regard,
>
> Stefan
>
> david delbecq wrote:
>> Hello,
>>
>> still in process of upgrading to maven2 here :)
>>
>> Most of the work is taking good shape, thanks to informations on this
>> ML.
>>
>> I have a question regarding a few of our goals.
>>
>> We have, for a war project, added a few goals that quickly do a copy
>> of a part of webapp to tomcat (instead of building war or even
>> compile). This is a way to allow easy test of jsp / pictures / css.
>> Just patch a life tomcat with new files. We do this with such a
>> command in maven 1
>>
>>
>> maven debug_deploy:jsp
>> maven debug_deploy:resources
>>
>> those goals are just simple ant copy tasks in maven.xml.
>>
>> What would be the recommanded way to convert this. Should i create a
>> custom plugin that adds those targets to maven2, and include plugin
>> in pom.xml, or is there a way to add targets to pom.xml? Should i use
>> the ant plugin, but then how do i link it to a target instead of a
>> phase?
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
--
David Delbecq
Institut Royal Météorologique
Ext:557
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Adding "goals" to pom.xml
Posted by VUB Stefan Seidel <ss...@vub.de>.
Hi David,
have a look at the plugin lists from maven.apache.org and
mojo.codehaus.org. There you will find a lot of plugins that do
difficult work for you. The antrun plugin is of course good for backward
compatibility, but I think there are better plugins if you just need to
copy a file. Search the mailing list archives for my previous posts on
that topic.
regard,
Stefan
david delbecq wrote:
> Hello,
>
> still in process of upgrading to maven2 here :)
>
> Most of the work is taking good shape, thanks to informations on this ML.
>
> I have a question regarding a few of our goals.
>
> We have, for a war project, added a few goals that quickly do a copy of
> a part of webapp to tomcat (instead of building war or even compile).
> This is a way to allow easy test of jsp / pictures / css. Just patch a
> life tomcat with new files. We do this with such a command in maven 1
>
>
> maven debug_deploy:jsp
> maven debug_deploy:resources
>
> those goals are just simple ant copy tasks in maven.xml.
>
> What would be the recommanded way to convert this. Should i create a
> custom plugin that adds those targets to maven2, and include plugin in
> pom.xml, or is there a way to add targets to pom.xml? Should i use the
> ant plugin, but then how do i link it to a target instead of a phase?
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
--
best regards,
Stefan Seidel
software developer
________________________
VUB Printmedia GmbH
Chopinstraße 4
D-04103 Leipzig
Germany
tel. +49 (341) 9 60 50 07
fax. +49 (341) 9 60 50 92
mail. sseidel@vub.de
web. www.vub.de
HRB Köln 24015
UStID DE 122 649 251
GF Dr. Achim Preuss Neudorf,
Dr. Christian Preuss Neudorf
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Adding "goals" to pom.xml
Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
You can't create new "targets" in Maven2 without making a plugin. The
targets maven2 understands are either <phase> or <plugin:goal>
-----Original Message-----
From: david delbecq [mailto:david.delbecq@oma.be]
Sent: Wednesday, March 12, 2008 6:12 PM
To: Maven Users List
Subject: Adding "goals" to pom.xml
Hello,
still in process of upgrading to maven2 here :)
Most of the work is taking good shape, thanks to informations on this
ML.
I have a question regarding a few of our goals.
We have, for a war project, added a few goals that quickly do a copy of
a part of webapp to tomcat (instead of building war or even compile).
This is a way to allow easy test of jsp / pictures / css. Just patch a
life tomcat with new files. We do this with such a command in maven 1
maven debug_deploy:jsp
maven debug_deploy:resources
those goals are just simple ant copy tasks in maven.xml.
What would be the recommanded way to convert this. Should i create a
custom plugin that adds those targets to maven2, and include plugin in
pom.xml, or is there a way to add targets to pom.xml? Should i use the
ant plugin, but then how do i link it to a target instead of a phase?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org