________
From: Rob Seegel
To: Ant Users List
Sent: Thursday, November 3, 2011 6:40 PM
Subject: Re: Checking if a Target Exists
Steve,
For my project I created a custom task that was basically an extension of
runtarget (from ant-contrib), which worked *almost* the way I wa
Ant 1.8 has extension-points which provides something similar to your use-case
http://ant.apache.org/manual/targets.html
From: Rob Seegel
To: Ant Users List
Sent: Thursday, November 3, 2011 6:40 PM
Subject: Re: Checking if a Target Exists
Steve,
For my
Steve,
For my project I created a custom task that was basically an
extension of runtarget (from ant-contrib), which worked *almost* the way
I wanted. I wanted the following specific case:
- core skeleton build process in one script, that contained hooks I
could use to "extend" with one
You are right Steve, that was an error on my part.
From: Steve Amerige
To: user@ant.apache.org
Sent: Thursday, November 3, 2011 12:05 PM
Subject: Re: Checking if a Target Exists
Hi Vimil,
Thanks for the code! I'm pretty sure the fifth line of the s
t to true if the target 'mytarget' is
present in the project. Otherwise it will not be set.
From: Steve Amerige
To: Ant Users List; Vimil Saju
Sent: Thursday, November 3, 2011 7:27 AM
Subject: Re: Checking if a Target Exists
Hi Vimil,
Thanks for the fe
Users List
Subject: Re: Checking if a Target Exists
Here is an example, I havent tested it though
the scriptdef can be then invoked as folows
the property 'targetExists' will be set to true if the target 'mytarget' is
present in the project.
___
From: Steve Amerige
To: Ant Users List ; Vimil Saju
Sent: Thursday, November 3, 2011 7:27 AM
Subject: Re: Checking if a Target Exists
Hi Vimil,
Thanks for the feedback. Any specifics on just how to do what you
mention (even if untested)?
Thanks again,
Steve Amerige
SAS I
I was looking for a solution to this problem some time back :-). Didn't
know someone else might run into the same thing. I resorted to calling the
target without checking for its existence and ignoring the failure. No
longer working on that stuff :-).
Thanks Steve for asking and Vimil for suggesti
Hi Vimil,
Thanks for the feedback. Any specifics on just how to do what you mention
(even if untested)?
Thanks again,
Steve Amerige
SAS Institute, Deployment Software Development
On 11/3/2011 9:55 AM, Vimil Saju wrote:
I think you can use the scriptdef task to do this. You can write a script
I think you can use the scriptdef task to do this. You can write a
script within the scriptdef object to access the methods of the project object.
The project object has methods to list the targets defined under the project,
which you can use to test if a given target exists.
Btw antcall does no
10 matches
Mail list logo