ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <>
Subject Re: ant subtask doesn't read properties file.
Date Thu, 06 Nov 2003 13:57:30 GMT
I see the problem (I think).
you specify antfile="build.xml" in <ant/>, this will
be resolve to the ant file : "${basedir}/xpress_client/build.xml"
and not ${basedir}/build.xml since you have specified the
"dir" attribute of <ant/>. If the subdir's build.xml had
a <property file="${basedir}/"/> it should

<project default="call">
  <property file="${basedir}/"/>
  <target name="show">
    <echo>p1 is ${p1}</echo>
    <echo>p2 is ${p2}</echo>
  <target name="call">
    <ant antfile="${basedir}/prop.xml" inheritall="no"
         dir="${basedir}/subdir" target="show"/>
p1=this is p1
p1=this is p1 in subdir
p2=this is p2 in subdir


     [echo] p1 is This is p1 in sub
     [echo] p2 is This is p2 in sub


On Thursday 06 November 2003 13:37, Kurt Guenther wrote:
> When I do a:
>   <property file="${basedir}/"/>
>   <target name="build.subdirs">
>      <ant dir="${basedir}/xpress_client" antfile="build.xml"
> target="build" inheritAll="false"/>
>    </target>
> Ant builds the subproject, but it doesn't reread the "
> file that's in the sub-project.  I've gotten around it by doing:
>   <target name="build.subdirs">
>      <ant dir="${basedir}/xpress_client" antfile="build.xml"
> target="build" inheritAll="false">
>         <property file="${basedir}/"/>
>      </ant>
>   </target>
> But, it seems with the inheritAll="false", the subproject should behave
> by not skipping this statement:
>   <property file="${basedir}/"/>
> Any thoughts?
> --Kurt
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message