https://issues.apache.org/bugzilla/show_bug.cgi?id=52960
Bug #: 52960
Summary: import file with 'as' and referencing target with
prefix broken in some circumstances
Product: Ant
Version: 1.8.3
Platform: PC
Status: NEW
Severity: major
Priority: P2
Component: Core
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Created attachment 28491
--> https://issues.apache.org/bugzilla/attachment.cgi?id=28491
three build scripts to reproduce the issue
I have a fairly complex build process that relies upon importing several build
scripts and target overriding that has been working for several older versions
of Ant that no longer works with the 1.8.3 release.
I have attached three simple ant scripts which allow you to reproduce the
problem. After unpacking the attached zip, run the following command and you
should get the same output as below. Running this same command in Ant 1.8.2
works correctly.
C:\dev\test\ant_defect>ant -v clean
Apache Ant(TM) version 1.8.3 compiled on February 26 2012
Trying the default build file: build.xml
Buildfile: C:\dev\test\ant_defect\build.xml
Detected Java version: 1.6 in: C:\Program Files\Java\jdk1.6.0_30\jre
Detected OS: Windows 7
parsing buildfile C:\dev\test\ant_defect\build.xml with URI =
file:/C:/dev/test/
ant_defect/build.xml
Project base dir set to: C:\dev\test
parsing buildfile
jar:file:/C:/tools/apache-ant-1.8.3/lib/ant.jar!/org/apache/to
ols/ant/antlib.xml with URI =
jar:file:/C:/tools/apache-ant-1.8.3/lib/ant.jar!/o
rg/apache/tools/ant/antlib.xml from a zip file
Importing file C:\dev\test\ant_defect\x.xml from
C:\dev\test\ant_defect\build.xm
l
Overriding previous definition of reference to ant.projectHelper
parsing buildfile C:\dev\test\ant_defect\x.xml with URI =
file:/C:/dev/test/ant_
defect/x.xml
Already defined in main or a previous import, ignore clean
Importing file C:\dev\test\ant_defect\compile.xml from
C:\dev\test\ant_defect\x.
xml
Overriding previous definition of reference to ant.projectHelper
parsing buildfile C:\dev\test\ant_defect\compile.xml with URI =
file:/C:/dev/tes
t/ant_defect/compile.xml
Already defined in main or a previous import, ignore initProperties
Overriding previous definition of reference to ant.projectHelper
Overriding previous definition of reference to ant.projectHelper
Importing file C:\dev\test\ant_defect\compile.xml from
C:\dev\test\ant_defect\bu
ild.xml
Skipped already imported file:
C:\dev\test\ant_defect\compile.xml
BUILD FAILED
Target "compile.initProperties" does not exist in the project "common test". It
is used from target "initProperties".
at org.apache.tools.ant.Project.tsort(Project.java:1912)
at org.apache.tools.ant.Project.tsort(Project.java:1919)
at org.apache.tools.ant.Project.tsort(Project.java:1919)
at org.apache.tools.ant.Project.topoSort(Project.java:1820)
at org.apache.tools.ant.Project.topoSort(Project.java:1783)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:811)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Total time: 0 seconds
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.