ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@locus.apache.org>
Subject Re: Individual access to target components
Date Mon, 23 Oct 2000 15:25:25 GMT
At 09:17  23/10/00 -0500, you wrote:
>Suppose I have something like the following build.xml:
>
><project name="foo" default="bar" basedir=".">
>    <task name="bar">
>        <javac .../>
>        <rmic .../>
>        <jar .../>
>        <signjar .../>
>    </task>
></project>
>
>
>Is there any way to type something like "ant bar -subtask javac" to run
>only the javac component of the bar task?

Nope it kinda of goes against the philosophy of ant (tasks are meant to be
atomic bits of work). So to get what you want you would need to do

<project name="foo" default="bar" basedir=".">
    <task name="bar">
        <javac .../>
    </task>

    <task name="bar1" depends="bar">
        <rmic .../>
    </task>

    <task name="bar2" depends="bar1">
        <jar .../>
    </task>

    <task name="bar3" depends="bar2">
        <signjar .../>
    </task>
</project>

and then go "ant bar"


Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*

Mime
View raw message