You can send parameters down your call, but you cannot expect side effects on those sub-projects to take effect in the caller.
<ant .....> <param name="a" value="x"/> </ant> the property "a" will be available during the execution of the subproject. As if you had invoked the command "ant -Da=x ...". Jose Alberto > -----Original Message----- > From: Charles Tewksbury [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 25, 2000 12:54 PM > To: [EMAIL PROTECTED] > Subject: RE: Persistence of Property > > > Thanks for the answer. > > So taking this a little bit further. I take it that there is > no way of > promulgating props (that are set in other xml files) up the > project path? > For instance, when calling submodule builds. (Not through an > antcall but > just an ant task). > > -----Original Message----- > From: Jose Alberto Fernandez [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 25, 2000 1:55 PM > To: '[EMAIL PROTECTED]' > Subject: RE: Persistence of Property > > > Well, I do not think we can call it "by design", I would say > it is a feature. The issue to keep in mind here is that > <antcall> does not execute on the same "context" as the caller. > It is actually calling the execution of a different project that > just happens to be the same as the one we are executing. > > This means that the properties defined during its execution > will be reset > at the end on the <antcall>, and hence the funny behaviour. > > The following targets will produce your expected output: > > <target name="main" depends="pre,dosomething" > > <echo message="Ending Main:${test.prop}" /> > </target> > > <target name="pre"> > <echo message="Starting main:${test.prop}" /> > </target> > > <target name="dosomething"> > <property name="test.prop" value="isSet" /> > <echo message="in dosomething:${test.prop}" /> > </target> > > > > From: Charles Tewksbury [mailto:[EMAIL PROTECTED] > > > > Question about the property tag and release 1.2. > > > > From "What's New"; it states:${} expansion now happens at > runtime and > > <property> tags > > living inside of targets only take effect if they are visited at > > runtime. > > > > Does this property get set to a "project level" For instance: > > > > <target name="main"> > > <echo message="Starting main:${test.prop}" /> > > <antcall target="dosomething" /> > > <echo message="Ending Main:${test.prop}" /> > > </target> > > > > <target name="dosomething"> > > <proprty name="test.prop" value="isSet" /> > > <echo message="in dosomething:${test.prop}" /> > > </target> > > > > produces the following output: > > main: > > Starting main:${test.prop} > > > > dosomething: > > in dosomething:isSet > > Ending Main${test.prop} > > > > It seems to me, that once the property is set, it should > > remain set until > > the Project is done. Is what is happening currently a bug or > > by design? > > > > - Charles Tewksbury > > >
