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/05/17 12:33:53 UTC

DO NOT REPLY [Bug 39597] New: - Reference not seen in imported antfile

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

           Summary: Reference not seen in imported antfile
           Product: Ant
           Version: 1.6.5
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: juerg@pyx.ch


Given three buildfiles a.xml, b.xml and c.xml (see attachemnts)
a.xml calls b.xml with
<ant antfile="b.xml" target="b">
  <reference refid="somereference"/>
</ant>

In b.xml there is an
<include file="c.xml"/>

and in c.xml the reference 'somereference' is used outside any target
e.g.
<project ...>
  <pathconvert refid="somereference" .../>
</project>

The reference can not be seen in c.xml ??

-- 
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 39597] - Reference not seen in imported antfile

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





------- Additional Comments From juerg@pyx.ch  2006-05-17 10:38 -------
Created an attachment (id=18299)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18299&action=view)
The imported buildfile


-- 
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 39597] - Reference not seen in imported antfile

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





------- Additional Comments From juerg@pyx.ch  2006-05-17 10:37 -------
Created an attachment (id=18297)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18297&action=view)
The 'master' buildfile

BUILD FAILED
/tmp/a.xml:10: The following error occurred while executing this line:
/tmp/b.xml:3: The following error occurred while executing this line:
/tmp/c.xml:5: Reference somepath not found.


-- 
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 39597] - Reference not seen by top level tasks in sub-projects

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


peterreilly@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Reference not seen in       |Reference not seen by top
                   |imported antfile            |level tasks in sub-projects




------- Additional Comments From peterreilly@apache.org  2006-09-22 10:50 -------
If b.xml is written like:
<project name="b" default="b">
  <pathconvert refid="somepath" pathsep=":" property="xx"/>
  <target name="b"/>
</project>

it also fails.

however this works and may be used as a work-around for the moment.

<project name="b" default="b">
  <target name="b-init">
    <pathconvert refid="somepath" pathsep=":" property="xx"/>
  </target>
  <target name="b" depends="b-init"/>
</project>

The problem is a little historic. In ant 1.5, it was
not possible to have top-level tasks (except property).
As this was the case, references would not be used except
in targets. As this was the case, it was decided to allow
references in sub-projects to be over-ridden by references
specified in the reference nested element of <ant>. This
is implemented by running all the top level tasks and types
of the sub-project and then setting the references set
in the <reference> element of ant.

-- 
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 39597] - Reference not seen in imported antfile

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





------- Additional Comments From juerg@pyx.ch  2006-05-17 10:37 -------
Created an attachment (id=18298)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18298&action=view)
The sub buildfile


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