Bug 55474 - Task Ant adds references after project implicit target is executed
Summary: Task Ant adds references after project implicit target is executed
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: nightly
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
Depends on:
Reported: 2013-08-23 18:33 UTC by dzidzitop
Modified: 2013-08-23 18:33 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description dzidzitop 2013-08-23 18:33:23 UTC
The task <ant> adds references after project implicit target is executed.

In the script below <typedef> in the root project element. The following happens:
- ant run is invoked
- typedef is executed; myantloader is initialised
- the target run is executed
- antcall is executed:
a) a new project for the target 'someTarget' is configured. This included executing the implicit project target. No myantloader is defined yet -> the taglib is loaded in its own classloader
b) addReferences() is invoked and initialises 'myantloader' with the classloader passed from the parent project

Expected: the classloader referenced as 'myantloader' is visible for the subproject's <typedef/>

<project name="test" default="make" basedir=".">
	<typedef resource="myantlib.properties" classpath="myantlib.jar" loaderRef="myantloader"/>

	<target name="run">
		<antcall target="someTarget" inheritRefs="true"/>
	<target name="someTarget">