ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravi Roy" <ravi.a...@gmail.com>
Subject RE: Is it possible to get a value of getter method from a Java class to build.xml ?
Date Fri, 26 Jan 2007 05:12:19 GMT
I was able to solve this, thought to post it to help newbies like me :-)

 

                             Project project = getProject();

                             String propertyValue = valuetobeassigned;

                             project.setProperty(property, propertyValue);

 

and refer this property="identifier" in the build.xml.

 

Thanks.

 

Regards,

Ravi.

 

 

-----Original Message-----
From: Ravi Roy [mailto:ravi.aroy@gmail.com] 
Sent: Thursday, January 25, 2007 4:40 PM
To: dev@ant.apache.org
Subject: Is it possible to get a value of getter method from a Java class to
build.xml ?

 

Hi,

 

I am writing a Ant Task for my solution. My question is :

 

  - How can I refer a getter method's (return value) into build.xml ? 

 

 

For Example :

 

<target name="main">

   <task mytask attribute1="name" attribute2="age" />

</target>

 

I have provided the setter methods for these -- attribute1 and attribute2 in
my class, and these two attributes are written to a properity file.

 

How can I later refer these values written to property file in my build.xml
file ? Is it possible ? Sorry, if this sounds stupid, becuase I am new to
Ant Tasks Development.

 

Thanks for pointers!

 

Regards,

Ravi.

 

 

 

 

 


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