You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Nico Seessle <ni...@seessle.de> on 2000/09/15 09:08:36 UTC

[PATCH] CallTarget.java - Re: Recent change to property handling and a bug?

I also got this problem, here is the patch.

Changes:

1. Changed all occurences of "delegate" to "callee" (simply because my IDE
(guess which :-)) is giving me mysterous errors otherwise if I work on this
file - Sorry for that, but it make's my life easier for the moment since I'm
forced to use it currently...

2. Test if the ant.file in the current project contains an absolute name and
if the parent is equal to the basedir. If this is true only passing the
"basic" ant.file-name to the new project. (Don't know why I seem the only
one getting this problem, but it shouldn't break anything.

3. Remember all nested "param"s and "execute" them before antcall itself is
executing. This is the "fix" to the mentioned problem because the param's
are no longer executed on initialization and ant doesn't seem to execute
nested tasks itself.

Stefan: can you please verify the last one? I'm not 100% sure if this is
correct and that nested "tasks" should be handled by the parent?

Nico

----- Original Message -----
From: "Scotte Zinn" <sz...@patronix.com>
To: "Ant Developer Mailing List (E-mail)" <an...@jakarta.apache.org>
Sent: Friday, September 15, 2000 2:09 AM
Subject: Recent change to property handling and a bug?


> I have the two tasks below.  Each runs the same Build.xml in an Ant Task,
> differing on configuration within that Build.xml file.  Both targets get
> executed as part of the same Ant invocation.
>
> This worked up until syncing today with the recent changes to when
> properties are expanded.  What I was expecting is that the properties
> specified within the Ant task would be available in the nested Build.xml.
> However, they don't seem to be.  That is, inside the nested invocation,
> ${basename} doesn't get expanded to anything.
>
> I'm not sure if there is a bug here.  Can anyone answer this?
>
> -- Scotte
>
>     <!--
>
======================================================================= -->
>     <!-- Build the DebugLib.jar
>         -->
>     <!--
>
======================================================================= -->
>     <target name="DebugLib.DebugLib" depends="prepare">
>         <ant antfile="${src.dir}/DebugLib/Build.xml" target="DebugLib">
>             <property name="basename" value="DebugLib"/>
>             <property name="compile.flag.debug" value="on"/>
>             <property name="debug.flag" value="true"/>
>         </ant>
>     </target>
>
>     <!--
>
======================================================================= -->
>     <!-- Build the ReleaseLib.jar
>         -->
>     <!--
>
======================================================================= -->
>     <target name="DebugLib.ReleaseLib" depends="prepare">
>         <ant antfile="${src.dir}/DebugLib/Build.xml" target="ReleaseLib">
>             <property name="basename" value="ReleaseLib"/>
>             <property name="compile.flag.debug" value="on"/>
>             <property name="debug.flag" value="false"/>
>         </ant>
>     </target>
>

Re: [PATCH] CallTarget.java - Re: Recent change to property handling and a bug?

Posted by Nico Seessle <ni...@seessle.de>.
----- Original Message -----
From: "Stefan Bodewig" <bo...@bost.de>
To: <an...@jakarta.apache.org>
Sent: Friday, September 15, 2000 9:21 AM
Subject: Re: [PATCH] CallTarget.java - Re: Recent change to property
handling and a bug?


> >>>>> "NS" == Nico Seessle <ni...@seessle.de> writes:
>
>  NS> 1. Changed all occurences of "delegate" to "callee"
>
> OK, you've asked for it before so I'm going to change it 8^).

Thanks :-)

>
>  NS> 3. Remember all nested "param"s and "execute" them before antcall
>  NS> itself is executing.
>
> This should be done in <ant> instead of <antcall>. Going to submit it
> after a litle bit of testing.
>

OK, it was just a quick hack since my buildfile crashed yesterday. I just
submitted it as is since someone else got the same problem... There wasn't
much investigation in this fix :-)

Nico



Re: [PATCH] CallTarget.java - Re: Recent change to property handling and a bug?

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "NS" == Nico Seessle <ni...@seessle.de> writes:

 NS> I also got this problem, here is the patch.  Changes:

 NS> 1. Changed all occurences of "delegate" to "callee"

OK, you've asked for it before so I'm going to change it 8^).

 NS> 3. Remember all nested "param"s and "execute" them before antcall
 NS> itself is executing.

This should be done in <ant> instead of <antcall>. Going to submit it
after a litle bit of testing.

Stefan

Re: [PATCH] CallTarget.java - Re: Recent change to property handling and a bug?

Posted by Nico Seessle <ni...@seessle.de>.
Yes, it does.

Nico

----- Original Message -----
From: "Stefan Bodewig" <bo...@bost.de>
To: <an...@jakarta.apache.org>
Sent: Friday, September 15, 2000 9:39 AM
Subject: Re: [PATCH] CallTarget.java - Re: Recent change to property
handling and a bug?


> >>>>> "NS" == Nico Seessle <ni...@seessle.de> writes:
>
>  NS> 2. Test if the ant.file in the current project contains an
>  NS> absolute name and if the parent is equal to the basedir.
>
> Nico, could you please verify that my version of handling this
> situation (commited seconds ago) works for you as well?
>
> Stefan


Re: [PATCH] CallTarget.java - Re: Recent change to property handling and a bug?

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "NS" == Nico Seessle <ni...@seessle.de> writes:

 NS> 2. Test if the ant.file in the current project contains an
 NS> absolute name and if the parent is equal to the basedir.

Nico, could you please verify that my version of handling this
situation (commited seconds ago) works for you as well?

Stefan