ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francis ANDRE" <>
Subject Propagation/scope of dynamic computed name property
Date Fri, 19 Jul 2002 08:52:29 GMT
Hi all

Within the following build.xml, there are 2 targets 'schema.check' and 'rcs.check'. The rcs.check
target is the same as the
schema.check target except that the name of the module to checked is passed as a parameter
of an <antcall> in the 'test' target.
>From the value of the properties "foo" and "zor", I understand that computed name of properties
works fine.

 Thus in the execution traced below, the value of (1)schema.notrequired and (1)tools.notrequired
which both are true are correct
according to me. But while the (2) is true, the (2) is undefined
which is surprising. According to me,
(2) should be true as the scope of "" name should be global as
the one for

Any idea??

<project name="test" default="test">
    <property name="build"   value="out"/>
    <property name="${build}.exec" value="bar"/>
    <property name="foo"   value="${out.exec}"/>
    <property name="zor"   value="${build}.exec"/>

     <target name="schema.check">
     <uptodate property="schema.notrequired"
               targetfile="rcs/schema.rcs" >
         <srcfiles dir="jar"    includes="schema.jar"/>
     <echo message="(1)schema.notrequired=${schema.notrequired}"/>

    <target name="rcs.check">
     <echo message="module=${module}"/>
     <uptodate property="${module}.notrequired"
               targetfile="rcs/${module}.rcs" >
         <srcfiles dir="jar"    includes="${module}.jar"/>
     <echo message="(1)tools.notrequired=${tools.notrequired}"/>

    <target name="test" depends="schema.check">
     <echo message="build=${build}"/>
     <echo message="foo=${foo}"/>
     <echo message="zor=${zor}"/>

     <antcall target="rcs.check">
      <param name="module" value="tools"/>

     <echo message="(2)schema.notrequired=${schema.notrequired}"/>
     <echo message="(2)tools.notrequired=${tools.notrequired}"/>

Apache Ant version 1.5Beta2 compiled on May 31 2002
Buildfile: test.xml
Detected Java version: 1.3 in: C:\jdk1.3.1\jre
Detected OS: Windows 2000
parsing buildfile test.xml with URI = file:C:/exmlmedia/dev/test.xml
Project base dir set to: C:\exmlmedia\dev
Build sequence for target `test' is [schema.check, test]
Complete build sequence is [schema.check, test, rcs.check]

 [uptodate] schema.jar omitted as C:\exmlmedia\dev\rcs\schema.rcs is up to date.

 [uptodate] File "C:\exmlmedia\dev\rcs\schema.rcs" is up-to-date.
     [echo] (1)schema.notrequired=true

     [echo] build=out
     [echo] foo=bar
     [echo] zor=out.exec
Project base dir set to: C:\exmlmedia\dev
  [antcall] calling target rcs.check in build file C:\exmlmedia\dev\test.xml
parsing buildfile C:\exmlmedia\dev\test.xml with URI = file:C:/exmlmedia/dev/test.xml
Project base dir set to: C:\exmlmedia\dev
Override ignored for property build
Override ignored for property out.exec
Override ignored for property foo
Override ignored for property zor
Build sequence for target `rcs.check' is [rcs.check]
Complete build sequence is [rcs.check, schema.check, test]

     [echo] module=tools
 [uptodate] tools.jar omitted as C:\exmlmedia\dev\rcs\tools.rcs is up to date.
 [uptodate] File "C:\exmlmedia\dev\rcs\tools.rcs" is up-to-date.
     [echo] (1)tools.notrequired=true
     [echo] (2)schema.notrequired=true
Property ${tools.notrequired} has not been set
     [echo] (2)tools.notrequired=${tools.notrequired}


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

View raw message