Shawn:
Thanks a bunch...
So, I just refactored some of my targets - I have some
preprocess/process/postprocess targets and a "catch all" that depends on
the aforementioned. I was "hoping" to selectively skip the processing
assuming a property was set - oh well. Guess I'll add a depends where
appropriate - arg :(
Anyway - thanks for the prompt reply... I thought as much...but wanted to
double check ;)
Flossy
On Thu, 13 Aug 2009, Shawn Castrianni wrote:
The if/unless apply to the target they are specified on ONLY. They do not have
any effect on the depends targets. I don't like this either. I posted about
this very subject earlier this year. Here is a link to it:
http://www.nabble.com/ANT-enhancements-td24028826.html
---
Shawn Castrianni
-----Original Message-----
From: Scot P. Floess [mailto:sflo...@nc.rr.com]
Sent: Thursday, August 13, 2009 2:09 PM
To: user@ant.apache.org
Subject: Target unless question
All:
I was under the impression that using an unless attribute on a target will
not run the target if that property is set... However, if there are is a
depends attribute defined, the targets in the depend are run regardless?
Is this correct?
For example consider the following:
<project default="C">
<target name="A">
<echo message = "A"/>
</target>
<target name="B">
<echo message = "B"/>
</target>
<target name="C" unless = "stop" depends="A, B"/>
</project>
When I run as either:
ant -Dstop="true"
-or-
ant -Dstop=true
I get the following results:
Buildfile: build.xml
A:
[echo] A
B:
[echo] B
C:
In reading the online docs, it gave me the impression the atarget would
not run: "A target also has the ability to perform its execution if (or
unless) a property has been set."
So, the question is - is depends taking precedence over unless?
Scot P. Floess
27 Lake Royale
Louisburg, NC 27549
252-478-8087 (Home)
919-890-8117 (Work)
Chief Architect JPlate http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim
Architect Keros http://sourceforge.net/projects/keros
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org
----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and
privileged information for the sole use of the intended recipient. Any review,
use, distribution, or disclosure by others is strictly prohibited. If you are
not the intended recipient (or authorized to receive information for the
intended recipient), please contact the sender by reply e-mail and delete all
copies of this message.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org
Scot P. Floess
27 Lake Royale
Louisburg, NC 27549
252-478-8087 (Home)
919-890-8117 (Work)
Chief Architect JPlate http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim
Architect Keros http://sourceforge.net/projects/keros
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org