ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Calling sub projects from buildfile
Date Thu, 29 Nov 2001 12:42:53 GMT
On Thu, 29 Nov 2001, Johan Adelöw <Johan.Adelow@corustechnologies.com>
wrote:

> Yes, but the if/unless attribute checks only if the value is set or
> not in this way I will always set the value in the ant call either
> to my value "true" or to ${debug} or have I misunderstood you?

I didn't look at your build file and just thought you'd be setting
things like the debug attribute for javac based on this.

I'm sure there must be an easier solution, but having two <ant> task
in separate targets (guarded by if/unless attributes) one with and one
without a nested property element would work.

<target name="with-debug" if="debug">
  <ant ...>
    <property name="debug" value="${debug}" />
  </ant>
</target>

<target name="without-debug" unless="debug">
  <ant ... />
</target>

<target name="call-subproject" depends="with-debug, without-debug" />

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message