A cut-down version of the build/import files that
shows the problem would be helpfull.
I have run a small test:

top dir:
--------
im.xml
<project>
 <macrodef name="i">
   <sequential>
     <property file="build.properties"/>
   </sequential>
 </macrodef>
</project>

top.xml
<project default="sub">
 <import file="im.xml"/>
 <i/>
 <target name="sub">
   <subant inheritall="no" inheritrefs="no">
     <fileset dir="." includes="*/sub.xml"/>
   </subant>
 </target>
</project>

build.properties
p=top

sub dir:
---------
sub.xml
<project default="x">
 <import file="../im.xml"/>
 <i/>
 <target name="x">
   <echo>SUB: basedir="${basedir}"</echo>
   <echo>p is ${p}</echo>
 </target>
</project>
build.properties
p=sub

Everything looks fine.
Peter

Shackelford, John-Mason wrote:

I am seeing some odd behavior and wondered if others have noticed this
before.

I am using subant to call down to another buildfile and have set  both
inheritall="false" and inheritrefs="false", yet some properties seem to be
leaking down from the parent to the child, specifically properties that were
set during a macrodef invocation in the parent. The same macrodef is defined
and called in both parent and child, yet it appears that the parent's
definition is inherited by the child rather than being reloaded.

One symptom:

1. parent buildfile runs...

2. loads a macrodef imported from an external file which includes a line:
<property file="build.properties" />.


3. parent executes this macrodef

4. parent calls child via subant

5. child loads the same macrodef from the same external file.

6. child executes macrodef and the debug output indicates that though the
child's base directory had been properly, it attempts to load
build.properties from the parent's directory rather than its own.

There are other symptoms and I'd be happy to provide the 67k debug output if
it would be helpful.

Thanks,


John-Mason Shackelford

Software Developer
Pearson Educational Measurement - eMeasurement Group

2510 North Dodge St.
Iowa City, IA 52245
ph. 319-354-9200x6214
[EMAIL PROTECTED]
http://etest.ncspearson.com

**************************************************************************** This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. ****************************************************************************

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







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



Reply via email to