Bug 60817 - Ant include doesn't work correctly if same file is imported more than once
Summary: Ant include doesn't work correctly if same file is imported more than once
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: nightly
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-04 08:50 UTC by Stefan Bodewig
Modified: 2017-03-04 08:50 UTC (History)
0 users



Attachments
importing file (172 bytes, text/xml)
2017-03-04 08:50 UTC, Stefan Bodewig
Details
imported file (576 bytes, text/xml)
2017-03-04 08:50 UTC, Stefan Bodewig
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Bodewig 2017-03-04 08:50:17 UTC
Created attachment 34797 [details]
importing file

This is triggered by http://stackoverflow.com/questions/42589057/ant-include-file-more-than-once-overrides-targets

Using the attached combination of files I get

$ ant -f /tmp/i.xml -projecthelp -v
Apache Ant(TM) version 1.10.2alpha compiled on February 21 2017
Buildfile: /tmp/i.xml
Detected Java version: 1.8 in: /usr/lib/jvm/java-8-oracle/jre
Detected OS: Linux
parsing buildfile /tmp/i.xml with URI = file:/tmp/i.xml
Project base dir set to: /tmp
parsing buildfile jar:file:/devel/ASF/ant/bootstrap/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/devel/ASF/ant/bootstrap/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
Importing file /tmp/testbuild_import.xml from /tmp/i.xml
Overriding previous definition of reference to ant.projectHelper
parsing buildfile /tmp/testbuild_import.xml with URI = file:/tmp/testbuild_import.xml
Overriding previous definition of reference to ant.projectHelper
Importing file /tmp/testbuild_import.xml from /tmp/i.xml
Overriding previous definition of reference to ant.projectHelper
parsing buildfile /tmp/testbuild_import.xml with URI = file:/tmp/testbuild_import.xml
Overriding previous definition of reference to ant.projectHelper

Main targets:

 A.target3  test target 3
 A.target4  test target 4
 B.target1  test target 1
 B.target2  test target 2
Other targets:

 A.test
 B.1
 B.2
 B.3
 B.4
 B.target
Comment 1 Stefan Bodewig 2017-03-04 08:50:44 UTC
Created attachment 34798 [details]
imported file