https://issues.apache.org/bugzilla/show_bug.cgi?id=49015
Summary: Invoking "ant -p" fails when a path with ID
"ant.targets" exists.
Product: Ant
Version: 1.8.0
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Core
AssignedTo: [email protected]
ReportedBy: [email protected]
Invoking "ant -p" fails due to the existence of the path with ID "ant.targets"
in the following build.xml file:
<project>
<path id="ant.targets"/>
</project>
Command line output:
$ ant -p
Buildfile: C:\devel\workspace\ant-property-test\build.xml
java.lang.ClassCastException: org.apache.tools.ant.types.Path cannot be cast to
java.util.Vector
java.lang.ClassCastException: org.apache.tools.ant.types.Path cannot be cast to
java.util.Vector
at
org.apache.tools.ant.types.Description.getDescription(Description.java:76)
at org.apache.tools.ant.Project.getDescription(Project.java:774)
at org.apache.tools.ant.Main.printDescription(Main.java:1027)
at org.apache.tools.ant.Main.runBuild(Main.java:789)
at org.apache.tools.ant.Main.startAnt(Main.java:218)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
org.apache.tools.ant.types.Path cannot be cast to java.util.Vector
Line 76 of Description.java is as follows:
Vector targets = (Vector) project.getReference(ProjectHelper2.REFID_TARGETS);
The return value of project.getReference in line 76 is now the
org.apache.tools.ant.types.Path with ID "ant.targets" from the build file.
If "ant.targets" is a reserved ID it would be nice to at least have Ant print a
warning message if it is used in a build file.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.