ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: Problem with uptodate on Windows
Date Fri, 21 Jun 2002 15:21:02 GMT
Maybe it's a bug? Try using instead:

<uptodate property="global_tables.up2date"
          targetfile="${src}/data/create_global_tables.sql">
  <srcfiles dir= "${src}/data/datamodel" includes="*.wmdl"/>
</uptodate>
<uptodate property="brand_tables.up2date"
          targetfile="${src}/data/create_brand_tables.sql">
  <srcfiles dir= "${src}/data/datamodel" includes="*.wmdl"/>
</uptodate>

<condition property="create-tables.notRequired">
  <and>
    <isset property="global_tables.up2date" />
    <isset property="brand_tables.up2date" />
  </and>
</condition>

and see if it makes any difference. Replace <isset> by <equals arg2="true"/>
if you're using 1.4.1. --DD

PS: Note that I changed your <or> into an <and>, since table creating is not
required only if *both* are up-to-date, not just one, right?

-----Original Message-----
From: Chris Bailey [mailto:chris@codeintensity.com] 
Sent: Friday, June 21, 2002 12:49 AM
To: AntMailingList
Subject: Problem with uptodate on Windows

I'm having a problem with some conditionals, or in particular <uptodate> on
the Windows platform, hoping someone can point out the problem.

<condition property="create-tables.notRequired">
  <or>
    <uptodate targetfile="${src}/data/create_global_tables.sql">
      <srcfiles dir= "${src}/data/datamodel" includes="*.wmdl"/>
    </uptodate>
    <uptodate targetfile="${src}/data/create_brand_tables.sql">
      <srcfiles dir= "${src}/data/datamodel" includes="*.wmdl"/>
    </uptodate>
  </or>
</condition>

The property never gets set, even though both the .sql files have newer
dates than all the *.wmdl files.  I have tried switching it around so it
uses backslashes instead of forward slashes, just in case it was a Windows
specific thing, but didn't make a difference.  I have several other targets
like this that also don't seem to get set.

I'm using Ant 1.5Beta2 on Windows 2000.  This same set of tasks works fine
under Linux.

____
Chris Bailey       mailto:chris@codeintensity.com
Code Intensity     http://www.codeintensity.com


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message