ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
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">

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

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 name="package" depends="init" unless="only">
   <echo message="hi there"/>


View raw message