ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Champeau <schamp...@leaselink.com>
Subject RE: Retrieving values from task?
Date Tue, 03 Apr 2001 22:02:19 GMT
Thanks Alden,

I had no idea you could do that. It works great!

Steve C.

-----Original Message-----
From: azalmagr@ThoughtWorks.com [mailto:azalmagr@ThoughtWorks.com]
Sent: Tuesday, April 03, 2001 10:04 AM
To: ant-user@jakarta.apache.org
Subject: RE: Retrieving values from task?



Hi:

i think what Stefan was referring to was to have your task set an ant
property internally.  then when your script needs the value from the task,
that value can be referenced as any other ant property would.  such as:

in your custom task code:

this.getProject().setProperty("task1.propertyName", valueThatAntNeeds);

in your build.xml:

<task1 ... />
<task2 value="${task1.propertyName}" />

so now ${task1.propertyName} would be set with the value from task1, which
is essentially the getProperty() call that you want.


alden







Stephen Champeau <schampeau@leaselink.com>@leaselink.com> on 04/03/2001
11:37:15 AM

Please respond to ant-user@jakarta.apache.org

Sent by:  "Stephen Champeau" <schampeau@leaselink.com>


To:   <ant-user@jakarta.apache.org>
cc:

Subject:  RE: Retrieving values from task?


Stefan,

Thanks for your reply.

I'm afraid I was a bit vague. What I'm really after is the ability of the
ant xml script to retrieve a value from the task, rather than the script
setting the property of the task. In other words I need the script to be
able to call some sort of "getProperty()" on a task.

Steve

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org]
Sent: Monday, April 02, 2001 11:45 PM
To: ant-user@jakarta.apache.org
Subject: Re: Retrieving values from task?


Stephen Champeau <schampeau@leaselink.com> wrote:

> I have built several tasks that manage the build number of my
> project. I would now like to retrieve and use this build number from
> within my ant script. Is there any way to do this?

Make them set a property.

Stefan




Mime
View raw message