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=36955>. 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=36955 Summary: Path reference in a target, which is not executed, is set anyway. Product: Ant Version: 1.6.5 Platform: All OS/Version: Windows 2000 Status: NEW Severity: normal Priority: P2 Component: Core AssignedTo: dev@ant.apache.org ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] I build up a path through some init-targets. A path reference in a target (target "init.moreLibs" in the example below) is defined on execution, even though the enclosing task is *never* executed ! The path element with id="ref_libs2" behaves as if it was defined at the top-level. ========== Example build file =============== <?xml version="1.0" encoding="iso-8859-1"?> <project name="test.v1" default="test" basedir="."> <target name="init" depends="init.libs"> <path id="ref_cp"> <path refid="ref_libs1"/> <path refid="ref_libs2"/> </path> </target> <target name="init.libs"> <path id="ref_libs1"> <pathelement location="${ant.home}/lib/xercesImpl.jar"/> </path> </target> <target name="init.moreLibs"> <echo message="Executing target 'init.moreLibs'."/> <path id="ref_libs2"> <fileset dir="${ant.home}/lib"> <include name="ant*.jar"/> </fileset> </path> </target> <target name="test" depends="init"> <pathconvert property="_cp" refid="ref_cp" pathsep="${line.separator}"/> <echo> ${_cp} </echo> </target> </project> ====== Result with Ant 1.6.4 and 1.6.5 ===================================== ...\ant\bin\ant.bat -f test1.xml test java version "1.4.2_09" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-b05) Java HotSpot(TM) Client VM (build 1.4.2_09-b05, mixed mode) Buildfile: test1.xml init.libs: init: test: [echo] [echo] C:\seu\Aus\Aus_SP\ant\lib\xercesImpl.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-antlr.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-apache-bcel.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-apache-bsf.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-apache-log4j.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-apache-oro.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-apache-regexp.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-apache-resolver.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-commons-logging.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-commons-net.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-icontract.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-jai.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-javamail.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-jdepend.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-jmf.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-jsch.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-junit.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-launcher.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-netrexx.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-nodeps.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-starteam.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-stylebook.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-swing.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-trax.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-vaj.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-weblogic.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-xalan1.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant-xslp.jar [echo] C:\seu\Aus\Aus_SP\ant\lib\ant.jar [echo] BUILD SUCCESSFUL Total time: 1 second ============== Expected Result - with Ant 1.5.4 ==================== ...\ant\bin\ant.bat -f test1.xml test Buildfile: test1.xml init.libs: init: Caught exception (org.apache.tools.ant.BuildException) while expanding ref_cp: Reference ref_libs2 not found. test: BUILD FAILED file:C:/Projekte/POI/Tde/bin/test1.xml:31: Reference ref_libs2 not found. Total time: 0 seconds ========================================================================== -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]