You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2001/08/01 22:45:01 UTC
[Bug 2955] New: - unless ignores a true property in certain situations
PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT
ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW
AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE
DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL
BE LOST SOMEWHERE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2955
*** shadow/2955 Wed Aug 1 13:45:00 2001
--- shadow/2955.tmp.26467 Wed Aug 1 13:45:01 2001
***************
*** 0 ****
--- 1,56 ----
+ +============================================================================+
+ | unless ignores a true property in certain situations |
+ +----------------------------------------------------------------------------+
+ | Bug #: 2955 Product: Ant |
+ | Status: NEW Version: Nightly build |
+ | Resolution: Platform: PC |
+ | Severity: Normal OS/Version: Linux |
+ | Priority: Other Component: Core tasks |
+ +----------------------------------------------------------------------------+
+ | Assigned To: ant-dev@jakarta.apache.org |
+ | Reported By: ben@opennms.org |
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ I've winnowed down a problem with uptodate and unless where it does not act as I
+ would expect based on the examples I've seen. It's more difficult to explain
+ than to just give an example. First, touch a file called "from.txt", and then
+ "to.txt". Then try running ant on this build:
+
+ -----------
+ <?xml version="1.0"?>
+
+ <project name="uptodate_test" default="test" basedir=".">
+
+ <target name="init" >
+ <tstamp/>
+ </target>
+
+ <target name="test" depends="init">
+ <antcall target="something">
+ <param name="testproperty" value="something"/>
+ </antcall>
+ </target>
+
+ <target name="something.uptodate">
+ <uptodate property="${testproperty}.is.uptodate" targetfile="to.txt">
+ <srcfiles dir=".">
+ <include name="from.txt"/>
+ </srcfiles>
+ </uptodate>
+ </target>
+
+ <target name="something" depends="something.uptodate"
+ unless="${testproperty}.is.uptodate">
+ <echo message="something.is.uptodate = ${something.is.uptodate}"/>
+ </target>
+
+ </project>
+ -----------
+
+ ...I would have expected it to *not* echo anything because the unless would be
+ triggered, but it is not being triggered, even though the property has been
+ set. Is this expected behavior? If so, is there a way to accomplish what I'm
+ attempting here?
\ No newline at end of file