Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Help with <uptodate >

Help with <uptodate >

2003-03-25       - By Dominique Devienne
Reply:     1     2  

I strongly advise you to use <outofdate> from Ant-contrib instead ;-)

Much nicer. In your case targetfile takes a single file I believe. Use a
nested <fileset> or a <filelist> instead. --DD

   <outofdate>
     <sourcefiles>
       <pathelement location="pmodel/pmodel_gram.l" />
     </sourcefiles>
     <targetfiles>
       <pathelement location="pmodel/pmodel_gram.l.cpp" />
     </targetfiles>
     <sequential>
       <echo>Flexing pmodel/pmodel_gram.l...</echo>
       <exec executable="${tools.dir}/bin/flex.exe">
         ...
       </exec>
     </sequential>
   </outofdate>


-----Original Message-----
From: Jason Bodnar [mailto:jason@(protected)]
Sent: Tuesday, March 25, 2003 4:13 PM
To: user@(protected)
Subject: Help with <uptodate>

I'm trying to use <uptodate> to determine whether to run a zeus task or not.
I
want to see if the dtd file zeus uses is newer than the .java files zeus
last
generated. I have the following in my build.xml:

<!-- decide if we need to run the zeus task -->
<target name="configUptodate" depends="init"
            description="Update config classes if the dtd has changed">
 <uptodate property="dontRunZeus" srcfile="config.dtd"
     targetfile="${src}/com/broadq/qcaststation/config/*.java"/>
</target>

<target name="zeus" depends="configUptodate" unless="${dontRunZeus}"
  description="make zeus classes">
 <zeus destDir="${src}">
   <constraint type="DTD" constraintFile="config.dtd"
         collapseSimpleElements="true"
    javaPackage="com.broadq.qcaststation.config"/>
 </zeus>
</target>

But the zeus target is always getting run even though the dtd is older than
${src}/com/broadq/qcaststation/config/*.java.

What am I doing wrong?

Thanks,

Jason

--
Jason Bodnar
jason@(protected)
http://www.shakabuku.org

"You want free speech? Let's see you acknowledge a man whose words make
your blood boil who is standing center stage advocating at the top of
his lungs that which you would spend a lifetime opposing at the top of
yours." -- President Andrew Shephard, "The American President"

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.