ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 17367] New: - Problem in 'target' with if/unless and depends.
Date Tue, 25 Feb 2003 11:50:34 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17367>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17367

Problem in 'target' with if/unless and depends.

           Summary: Problem in 'target' with if/unless and depends.
           Product: Ant
           Version: 1.5.1
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: eu@dukascopy.com


depend targets run befor check of if/unless ?

<?xml version="1.0" ?>
<project name="JavaServer" default="test" basedir=".">
  <target name="check-cvs-user-property" unless="cvs-user">
    <fail message="CVS user not set"/>
  </target>
  <target name="check-cvs-server-property" unless="cvs-server">
    <fail message="CVS server not set"/>
  </target>
  <target name="build-cvs-root"
          depends="check-cvs-user-property, check-cvs-server-property"
	  unless="cvs-root">
    <property name="cvs-root" value=":pserver:${cvs-user}@${cvs-server}:/src"/>
  </target>
  <target name="props">
    <property name="cvs-root" value=":pserver:eu@santana:/src "/>
  </target>

  <target name="test" depends="props, build-cvs-root">
    <echo  message="cvs-root=${cvs-root}"/>
  </target>
</project>

I tried this example and got:

props: 

check-cvs-user-property:
 
BUILD FAILED
file:/home/eu/cvs-work/test-ant/tt.xml:8: CVS user not
set

Mime
View raw message