ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Eramo <MEr...@lightbridge.com>
Subject Running part of the target based on the existence of a property file
Date Thu, 26 Jan 2006 15:55:26 GMT
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


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