ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Volkar <>
Subject RE: Newbie help <property>
Date Fri, 28 Dec 2001 15:17:16 GMT
Never mind, I've worked around this by having "expand-properties" do an
<antcall> to another intermediate <target> that finishes up.

John Volkar

-----Original Message-----
From: John Volkar []
Sent: Friday, December 28, 2001 7:45 AM
Subject: Newbie help <property>

Okay, once more...

It seems that properties are only inheritable "downwards" thru a series of
<antcall>'s.  I can see why this is (you would not want child targets
messing up parent target property settings.  However, I have a situation
where I want a child <target> to set properties that I want to use in the
parent <target>.  (see "expand-properties" in the attached sample)  

How could I allow a child target to set a property that would then be
visible to a calling target?

John Volkar

The following is a shortened part of a master build script that will
eventualy have 40-50 separate steps in it's "build-sequence".  The default
<target> for the project is specified as "quicktest".  

The following is the series of calls made for "someproject"...  My problem
is in expand-properties, it fabricates several properties from one base
propery and I do not want to repeat that expansion logic everywhere, so my
original intent was to use <target name="expand-properties"> as a sort-of


  <target name="quicktest">
    <property name="build-targets" value="build-targets-quicktest"/>
    <antcall target="build-sequence"/>

  <target name="build-sequence">
    <antcall target="prepare-environment"/>   
      <antcall target="build-somehugeproject"/>
        <antcall target="build-someproject"/>
        <antcall target="build-someotherproject"/>

  <target name="build-somehugeproject">
    <property name="project-name" value="core\somehugeproject"/>
    <antcall target="${build-targets}"/>

  <target name="build-someproject">
    <property name="project-name" value="utilities\someproject"/>
    <antcall target="${build-targets}"/>

  <target name="build-someotherproject">
    <property name="project-name" value="utilities\someotherproject"/>
    <antcall target="${build-targets}"/>

  <target name="build-targets-quicktest">
    <antcall target="expand-properties"/>
    <antcall target="cleanup-project"/>
    <antcall target="vssget-project"/>
    <antcall target="antbuild-project"/>
    <antcall target="cleanup-project"/>

  <target name="expand-properties">
    <property name="project-path" value="${basedir}\${project-name}"/>
    <property name="project-path-src" value="${project-path}src\"/>
    <property name="project-path-javadoc" value="${project-path}javadoc\"/>

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

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

View raw message