ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Pepersack" <RPepers...@mdinsurance.state.md.us>
Subject Re: Can Ant Parse a Property
Date Mon, 29 Jan 2007 13:04:54 GMT
What I mean by "parse the property in the build file" is this:  I have a
property defined in a build file that I want to break into two or more
pieces based on a delimiting character, and then use the pieces
separately.  I wrote a custom Ant task that gets the contents of the
original property from outside of Ant, so I have no control over its
original value, and the original value may change from build to build.

For example, if the value the original property is set to is "C\Program
Files\Sybase\EAserver\java\lib\jconn2.jar;;C\Program
Files\Sybase\EAserver\java\classes\xerces.jar", then I would like to
break this string into two pieces at the ";;".

Thanks,

Bob

Robert Pepersack
Senior Lead Developer
Maryland Insurance Administration
410-468-2054

>>> ninju_bohra@yahoo.com 01/28/2007 11:13:56 PM >>>
What do you exact mean by "parse the property in the build file"?

If you want to have access to the value of a key defined in the
property file, you can load the property file via the <property
file="filename"/> and assuming the file conforms to JAVA property file
standards the properties will be loaded into the ANT session and you
reterive the value just like any other property (via the ${key}
notation).

Hope that helps,

Ninju


----- Original Message ----
From: Robert Pepersack <RPepersack@mdinsurance.state.md.us>
To: user@ant.apache.org 
Sent: Friday, January 26, 2007 1:47:20 PM
Subject: Can Ant Parse a Property


Hello.

I have a custom Ant task that populates a property in by build file. 
I
would like to parse the property in the build file.  Does anyone know
how?

If not, then I'll parse it in the custom Ant task.

Thanks,

Bob

Robert Pepersack
Senior Lead Developer
Maryland Insurance Administration
410-468-2054

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org 
For additional commands, e-mail: user-help@ant.apache.org 


 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org 
For additional commands, e-mail: user-help@ant.apache.org 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message