Thanks Benjamin, I was able to put something together based on that example and got it to work just fine.
Regards, Mark "Burgess, Benjamin" <[EMAIL PROTECTED]> 01/26/2006 11:07 AM Please respond to "Ant Users List" <user@ant.apache.org> To "Ant Users List" <user@ant.apache.org> cc Subject RE: Running part of the target based on the existence of a property file The ant way do this would be something like this: <property name="my.file" location="/some/file/path/my.file"/> <target name="-check-for-file"> <available file="${my.file}" property="file.exists"/> </target> <target name="-build-ejb" if="file.exists"> < build ejb tasks > </target> <target name="all" depends="-check-for-file,-build-ejb"/> -----Original Message----- From: Mark Eramo [mailto:[EMAIL PROTECTED] Sent: Thursday, January 26, 2006 10:55 AM To: user@ant.apache.org Subject: Running part of the target based on the existence of a property file Hi, I am relatively new to using property files to pass values to Ant as well as using the if statement in Ant. What I would like to do is run part of a custom target based on the existence of a property file. Here is what I want to do <target CREATE A CUSTOM EJB> <if property file exists in ${project-root}> <create the custom ejb> <else> <No custom ejb to be built> </target> Basically, what I am trying to figure out is can you use ANT to test for a file in a specific location and if it is there, it would set the flag to true thus execute what is part of the if statement, in this case, build the custom ejb if a properties file exists in ${project-root}? Thanks, Mark ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]