ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30114] - Using AntCall with a param causes inheritAll="false" to be ignored.
Date Thu, 15 Jul 2004 08:49:42 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30114>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30114

Using AntCall with a param causes inheritAll="false" to be ignored.

peterreilly@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From peterreilly@apache.org  2004-07-15 08:49 -------
This is invalid. The examples just use one property "deploy_dir". This
gets passed as a parameter in the <antcall> call. When a parameter is
used in an <antcall> task, it behaves like a user property and gets passed
to subsequent <ant> and <antcall> calls.  This is (sort of) explained in the
<ant> and <antcall> manual pages. Modifing the examples as follows:
build.xml:
<project default="run" basedir=".">
  <property name="deploy_dir" value="build/release" />
  <property name="x" value="outer"/>

  <target name="run" depends="test1,test2,test3" />

  <target name="test1">
    <ant inheritAll="false" antfile="deploy.xml" />
  </target>

  <target name="test2">
    <antcall target="called" />
  </target>

  <target name="test3">
    <antcall target="called">
      <param name="deploy_dir"      value="build/view"/>
    </antcall>
  </target>

  <target name="called">
    <ant inheritAll="false" antfile="deploy.xml" />
  </target>
</project>

deploy.xml:
<project default="test" basedir=".">
  <property name="deploy_dir"      value="build/bob"/>
  <property name="x" value="inner"/>
  <target name="test">
    <echo>deploy_dir = ${deploy_dir}</echo>
    <echo>x = ${x}</echo>
  </target>
</project>

In all cases, the x is set to "inner".

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message