ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lopez, William" <>
Subject Conditional (compound) Help Please
Date Thu, 31 Jul 2003 04:57:32 GMT
I have a need for a task that compares a jar to it's "list" of class files
(found uptodate to work fine for the first part of the compare). 

I expect the second compare to never be true when the first is (*to meet the
target execute condition*). The <not> part is not working like I thought (as
a negator)...I tried the <outofdate> task but it always ends up executing
the target...see below, 2nd example.

My scenario:
-There is another task that executes unless="noprefix_uptodate"....this
generates/deploys the ejb jar for the non-jndi prefix ejb
-Then ejb.jar is called (via <antcall> 3x - 1 per other jndi prefixes)...the
only difference between these jars is the jndi prefix

I'm sure there is a clean, simpler way but I can not figure it out. Thanks!
  <target name="chk-ejbjndi-notuptodate">
    <condition property="${jndiPrefix}_notuptodate">
          <uptodate targetfile="${app.module.dir}\NO_Prefix\${}"
              <srcfiles dir= "${}" includes="**/*.class"/>
targetfile="${app.module.dir}\${jndiPrefix}\${}" >
               <srcfiles dir= "${}"
    <propertycopy name="jndi_outofdate" from="${jndiPrefix}_notuptodate"
    <echo>${jndiPrefix} notuptodate: ${jndi_property}</echo>

 <target name="ejb.jar" depends="chk-ejbjndi-notuptodate"

 ==================== <outofdate> ==============================
<target name="chk-ejbjndi-notuptodate">
     <uptodate property="ejb_uptodate"
targetfile="${app.module.dir}\NO_Prefix\${}" >
       <srcfiles dir="${}" includes="**/*.class"/>
     <outofdate property="jndi_notuptodate">
         <fileset dir="${}" includes="**/*.class"/>
         <isset property="ejb_uptodate"/>
         <isset property="jndi_notuptodate"/>
       <property name="jndi_outofdate" value="true"/>
     <echo>${jndiPrefix} notuptodate: ${jndi_outofdate}</echo>

  <target name="ejb.jar" depends="chk-ejbjndi-notuptodate"

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message