Hi, I wanted to see if the behavior I see when using the ant-contrib's 
'outofdate' task is a correct one. Basically, I'm trying to determine if 
generated EAR archive (in the exploded form) has any out of date files in 
respect to the source directories, and re-copy those files if so.
Here is my task:
      <target name="check.ear.exploded.uptodate" >
        <outofdate property="ear.not.uptodate">
              <sourcefiles>
                  <fileset dir="${build.jars}"
                    includes="*.jar"/>                  
                  <fileset dir="${build.wars}"
                    includes="*.war"/>
                  <fileset dir="${basedir}/rsrc/deployment"
                    includes="application.xml"/>
              </sourcefiles>
              <targetfiles>
                <fileset dir="${destination}/myapp.ear" includes="**/*"/>
              </targetfiles>
              <sequential>
                <echo message="exploded myapp.ear dir is not uptodate - 
rebuilding"/>
            </sequential>
        </outofdate> 
      </target>

Now, if there are no files in the "${destination}/myapp.ear" directory yet (I'm 
building for the first time after cleanup) - the outofdate task still returns 
TRUE. Needless to say, I would prefer the opposite behavior - if no target 
files 
exist - consider them out-of-date.
Is this the expected behavior or am I missing something?
Also, I hope this is the right forum to post this question to; if not - please 
let me know.

Thanks!
Marina

Reply via email to