ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gle...@ca.ibm.com
Subject Re: using unless
Date Thu, 27 Jul 2000 17:28:17 GMT




'Fraid so.  The unless attribute in this case means "Execute the package
target _unless_ the property 'only' has a value."  In your case, you didn't
set the property named "only" to anything, so the target was executed.

I think you were trying for something like

<target name="package" if="only" depends="init">
  ...
</target>

Glenn McAllister
TID - Software Developer - VisualAge for Java
IBM Toronto Lab, (416) 448-3805
"An approximate answer to the right question is better than the
right answer to the wrong question." - John W. Tukey


Please respond to ant-user@jakarta.apache.org

To:        ant-user@jakarta.apache.org
cc:
Subject:        using unless

I have the following and expected "hi there" NOT to be displayed but it
does. Am I using this wrong?

I also used the -quiet option and it wasn't quiet.

<project default="package" basedir=".">
 <target name="init" >
 </target>

  <target name="package" depends="init" unless="only">
   <echo message="hi there"/>
 </target>

</project>





Mime
View raw message