File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant task to fill a property data based on envirnment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant task to fill a property data based on envirnment" Watch "Ant task to fill a property data based on envirnment" New topic
Author

Ant task to fill a property data based on envirnment

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Guys,

I guess this might have been asked or solved a dozen of times. What I'm trying to do is to fill the values for a property data xxx.properties based on the environment on which I'm running my ANT script. Any suggestions or pointers to this would be helpful!


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

Take a look at the <condition> task, it sets properties based on any number of conditions including OS type.
http://ant.apache.org/manual/Tasks/condition.html


JBoss In Action
 
Consider Paul's rocket mass heater.
 
subject: Ant task to fill a property data based on envirnment
 
Similar Threads
how to call a target in same scope
How can I find the system IP in ANT?
How to read a property from a properties file in Ant?
Large file download(size upto 600MB)
Ajax and Struts