Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Subant and inheritrefs question

Subant and inheritrefs question

2007-05-30       - By Eric Wood

I have a question about how this should work. I have an outer wrapper
script that executes a subant as follows:

Wrapper.xml

 <target name="build-application" depends="build-application-init" >
     <subant target="build" inheritrefs="true" >
         <propertyset refid="subant.properties" />
         <filelist refid="application.build.files" />
     </subant>
 </target>

This in in turn executes a further subant as follows:

Ear.xml
      <subant target="build" inheritrefs="true"  >
         <propertyset refid="subant.properties" />
         <filelist dir="." id="EAR.build.files" >
             <file name="util.xml" />
         </filelist>
     </subant>

The build target in the util.xml file is not getting the necessary
subant properties that are passed in unless I pass a propertyset as
highlighted above.
I thought that the inheritrefs="true" would pass this refernce all the
way to my build target in the util.xml file

The sequence is wrapper.xml -> ear.xml -> util.xml

How is this suppose to work. I'm sure that I have misunderstood the
functionality. I'm using ant 1.6.5

Eric

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.