This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Apache Ant add property file and policy file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Apache Ant add property file and policy file" Watch "Apache Ant add property file and policy file" New topic
Author

Apache Ant add property file and policy file

Ellen fish
Greenhorn

Joined: Oct 28, 2008
Posts: 27
Hello,

I'm new to Ant and I'm try to include two files, console.property and java.policy to my Ant build.xml. Couldn't find much information online, any suggestions will be great help.
Thank you,



[ November 25, 2008: Message edited by: Ellen fish ]
[ November 25, 2008: Message edited by: Ellen fish ]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10067
    
163

Originally posted by Ellen fish:
I'm try to invlude two files, console.property and java.policy to my Ant build.xml.


You mean you want to add these 2 files to some (jar)file/deployable generated through Ant?


[My Blog] [JavaRanch Journal]
Ellen fish
Greenhorn

Joined: Oct 28, 2008
Posts: 27
yes, my java program need to use these two files.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

What I would do is add another target to place the files into their proper location in the ${classes.dir} directory:



(You never said where those files are located nor where you would like them to end up, so the above code assumes they are in the "resources" directory and that they should be in the base directory of the JAR file.)

Next, add this target as a dependency on the jar target:



JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Apache Ant add property file and policy file