You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Joe Germuska <Jo...@Germuska.com> on 2005/03/01 18:48:31 UTC
Applying Ant in Maven (Re: Latest build (ala Maven))
At 3:11 PM -0800 2/28/05, Don Brown wrote:
>Hey, mind sharing some tips for converting old Ant tasks to Maven?
In general, you can simply copy them into "maven.xml", wrapped in a
<goal>,<preGoal>, or <postGoal> tag. The only change is that you
must qualify each element with a namespace: as James set it up, the
namespace would be "ant", so
<echo>Hello World</echo>
becomes
<ant:echo>Hello World</ant:echo>
If its a task to be attained directly, wrap it in a "goal" tag with a
name attribute: for an example, see build/maven.xml: <goal
name="build-all">
If it is a task which is to be attained before or after some other
goal, use <preGoal> or <postGoal> accordingly, with a "name"
attribute whose name is the goal relative to which you want your
block executed.
Obviously, for this you can use any goal which you specify as an
argument to maven ("clean", "jar", etc), but sometimes you want to
get in the middle of an operation. In that case, sometimes a
plugin's homepage will list intermediate goals, or sometimes you have
to poke through the jelly script which drives the plugin.
Hope that helps.
Joe
--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction" -The Ex
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org