RE: Calling sub projects from buildfile

2001-11-29 Thread Johan Adelöw

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?  

-Original Message-
From: Stefan Bodewig [mailto:[EMAIL PROTECTED]]
Sent: den 29 november 2001 10:18
To: [EMAIL PROTECTED]
Subject: Re: Calling sub projects from buildfile


On Thu, 29 Nov 2001, Johan Adelöw [EMAIL PROTECTED]
wrote:

 This is all fine, but if someone then wants to debug compile we use
 a property debug withe the -D option on the command line call. When
 I use the inheritAll=false alternative this property wont either
 be inherited ofcourse.


property name=debug value=whatever-is-your-default-value /

...

ant inheritall=false ...
  property name=debug value=${debug} /
/ant

The -Ddebug=xyz will override the value defined with the property task
in the build file and the nested property element will pass this value
further down.

Stefan

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Calling sub projects from buildfile

2001-11-29 Thread Stefan Bodewig

On Thu, 29 Nov 2001, Johan Adelöw [EMAIL PROTECTED]
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:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]