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)schema.property is true, the (2)tools.property is 
undefined which is surprising. According to me,
(2)tools.property should be true as the scope of "tools.property" name should be 
global as the one for schema.property.

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"/>
     </uptodate>
     <echo message="(1)schema.notrequired=${schema.notrequired}"/>
    </target>

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

    <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"/>
     </antcall>

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


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]

schema.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

test:
     [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]

rcs.check:
     [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}

BUILD SUCCESSFUL


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

Reply via email to