You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2006/08/14 14:41:32 UTC

DO NOT REPLY [Bug 40247] New: - availiable property is not set outside a target

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=40247>.
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=40247

           Summary: availiable property is not set outside a target
           Product: Ant
           Version: 1.6.5
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: Christof.Engel@navigon.com


In the following example the test of file-availiable does only work inside the
same target, but as I think, the property should be set also outside the target.
The build1.building should be echoed twice, not only once as it does here:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- 
@author  Christof Engel
@brief   Availiable / property / Antcall bug?
  checkFiles should set the properties "build1.building" and "build2.building"
  regarding to the existence of files "build1-pc.building" / "build2-pc.building".
  But these properties are not set outside the target "checkFiles" as you see,
  when the call to "echo1" and "echo2" does nothing.
  But when checking again (inside target "test") and calling again echo1 and echo2
  now the echo comes up, regarding to the file existence.
  Bug: the properties build1.building and build2.building should also be availiable
  outside the target "checkFiles"
-->

<project default="test" name="Test" basedir=".">

  <property name="exdir" value="C:/"/>
  
  <target name="test">
    <echo file="${exdir}\build1-pc.building">test</echo>
    <antcall target="checkFiles"/>
    <antcall target="echo1"/>
    <antcall target="echo2"/>
    <available file="${exdir}\build1-pc.building" property="build1.building"/>
    <available file="${exdir}\build2-pc.building" property="build2.building"/>
    <antcall target="echo1"/>
    <antcall target="echo2"/>
  </target>
  
  <target name="checkFiles">
    <available file="${exdir}\build1-pc.building" property="build1.building"/>
    <available file="${exdir}\build2-pc.building" property="build2.building"/>
  </target>
  
  <target name="echo1" if="build1.building">
    <echo>property build1.building is set</echo>
  </target>

  <target name="echo2" if="build2.building">
    <echo>property build2.building is set</echo>
  </target>

</project>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40247] - availiable property is not set outside a target

Posted by bu...@apache.org.
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=40247>.
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=40247





------- Additional Comments From bodewig@apache.org  2006-08-14 16:27 -------
the property is only set as long as the sub-project spawned is executing, i.e.
you cannot access any property set during the targets you run weith <antcall>
after that task has completed.

You want your echo targets to declare depend="checkFiles" instead of using
antcall.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40247] - availiable property is not set outside a target

Posted by bu...@apache.org.
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=40247>.
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=40247


carej@us.ibm.com changed:

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




------- Additional Comments From carej@us.ibm.com  2006-08-14 12:54 -------
Please review the manual page for antcall.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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