ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nau, Michael" <Michael....@pyxis.com>
Subject Referencing a path id in another build file
Date Fri, 17 Jan 2003 09:18:37 GMT
Is there a way to reference a path id setup in foo.xml in bar.xml?

For example:

foo.xml
=============================================  
<project name="foo" default="" basedir=".">
  <path id="foo.cp">
    <pathelement location="${lib.dir}/j2ee.jar"/>
    <pathelement location="${lib.dir}/junit.jar"/>
  </path>

  <target name="foo">
    <ant antfile="bar.xml" target="print-foo.cp"/>
  </target>  
</project>
=============================================  

bar.xml
=============================================  
<project name="bar" default="" basedir=".">
  <target name="print-foo.cp">
    <pathconvert property="formatted-path" pathsep="${line.separator}
" refid="foo.cp"/>
    <echo message="path = ${formatted-path}"/>
  </target>  
</project>
=============================================  

output
=============================================  
D:\Temp>ant -f foo.xml foo
Buildfile: foo.xml

foo:

print-foo.cp:

BUILD FAILED
file:D:/Temp/bar.xml:3: Reference foo.cp not found.

Total time: 1 second
=============================================  

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message