ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <ddevie...@gmail.com>
Subject Re: Command-Line execution of a third-party task
Date Fri, 23 Mar 2012 10:44:00 GMT
On Fri, Mar 23, 2012 at 9:29 AM, Andy Stevens
<insomniacpenguin@googlemail.com> wrote:
> Why not just create your own mybuild.xml and run that with ant -f ?
> No need to alter the original build.xml, but you could always import it to
> take advantage of any initialise targets etc.

Note that Mike mentioned executing *tasks* from the CLI, not targets,
i.e. potentially without any build.xml.

For example "ant -e mkdir -dir=foo" or "ant -e zip
'-includes=classes/**' -destfile=classes.jar".

He does mention having many build files, and using *custom* tasks,
which might require explicit taskdefs and classpaths, but assuming the
custom tasks are already packaged in an antlib that's already on the
classpath, or explicitly loaded with -lib, then it's only the matter
of prefixing the task name with its namespace, as in "ant -lib
libs/ant-contrib.jar -e antlib:net.sf.antcontrib:sometask ...".

But maybe I didn't quite understand Mike's original post. In any case,
I kinda like his idea, or Maven's I guess, the way I understood it at
least :) --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message