ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rubun Tang <>
Subject RE: private Target
Date Mon, 25 Feb 2002 18:53:55 GMT
Perhaps you could use the <condition> tag in Ant to get around this.
First, set the condition flag in the "public" target. Then, in the private,
use the condition tag such that if the condition flag is not set, the
operation inside the tag will not run. (and you might output a message
telling the user the correct way to use your build.xml)
This is a workaround for your problem, it won't stop users calling the
target, but it prevents erroneous operations.

Rubun Tang

-----Original Message-----
From: Steve Loughran []
Sent: Monday, February 11, 2002 8:22 PM
To: Ant Users List
Subject: Re: private Target

----- Original Message -----
From: "Diane Holt" <>
To: "Ant Users List" <>
Sent: Monday, February 11, 2002 16:27
Subject: Re: private Target

> --- Steve Loughran <> wrote:
> > you can make it very hard (but not impossible) to call from the command
> > line by putting a - at the front of the name,
> Exceedingly clever!  But one question: How is it not impossible -- I sure
> couldn't get one to run from the command line.

you cant do it directly, but you can do it with something like <ant>, or
perhaps an IDE

personally I dont bother; I like the option to call the lower level stuff
during dev, and if there is some prerequisite which must be met, well there
are <depends> to state them, and <fail> to validate any other assumptions,
like an assert() in C

> > or a space anywhere in it.
> This option, on the other hand, was easily worked around on the c/l --
> just quote it.

confuses jEdit no end though


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message