You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by David McTavish <dm...@SANDVINE.com> on 2002/12/18 17:22:46 UTC

RE: Creating a property from construct in another ant file ?

The only way that I've seen re-usable "paths" using ref-id is to import the
xml file into the desired build script.
ie:
have a generic build.xml that contains the re-usable classpath elements, and
in your satellite build script, import as follows:

<!DOCTYPE project [
<!ENTITY common SYSTEM "../../scripts/common-classpath.xml">
]>
<project name="lms" default="help" basedir=".">
&common;
<path id="compile.classpath">
    <path refid="resuable.classpath" />
</path>
</project>

d.
 
 
 
-----Original Message-----
From: Erlandsson Martin [mailto:Martin.Erlandsson@guide.se] 
Sent: Wednesday, December 18, 2002 11:17 AM
To: ant-user@jakarta.apache.org
Subject: Creating a property from <path> construct in another ant file?


Hi List!
 
 
I know how to reference a path construct in the same file, using something
like:
 
                      <path id="app.classpath">
                         <fileset dir="${BASE_DIR}/ThirdPartyJars/">
                              <include name="**/*.jar"/>
                         </fileset>
                      </path>
 
                      <property name="APP_CLASSPATH" refid="app.classpath"/>

 
 
My question to you: Is it possible to point the refid in the <property> tag
to a <path> construct in another ant file? If so, please tell me how! 
 
 
 
Thanks in advance!
 
/Martin Erlandsson