ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bromley, Steve" <SBrom...@erac.com>
Subject RE: Classpath stored in a single position?
Date Thu, 06 Sep 2001 17:25:13 GMT
One option is to use the ability of XML to include another XML file in an
XML file to move the path statement to an independent file.  That way, you
can include the XML whenever and whereever necessary and maintain it in a
single spot.  

The directions on how to do XML includes are in the Ant FAQ.  

> -----Original Message-----
> From: Ralph Jocham [mailto:rjocham72@yahoo.com]
> Sent: Thursday, September 06, 2001 10:48 AM
> To: ant-user@jakarta.apache.org
> Subject: Classpath stored in a single position?
> 
> 
> Hi,
> in our project we do have a rather long classpath.
> Currently I have this build.xml file in each package
> folder. (see below) But the Classpath changes often,
> so I have to change each build.xml file in each
> folder.
> Is it possible to extract the classpath into a single
> position from where it is being picked up by the
> build.xml file. That way I just have to change the
> classpath only once.
> 
> TIA
> Ralph
> 
> <project name="Test" default="compile" basedir=".">
> 
>   <!-- set global properties for this build -->
>   <property name="src" value="."/>
>   <property name="build" value="L:/java/build"/>
> 
>   <target name="init">
>     <!-- Create the time stamp -->
>     <tstamp/>
>   </target>
> 
>   <target name="compile" depends="init">
>     <!-- Compile the java code from ${src} into
> ${build} -->
>     <javac srcdir="${src}"
>            destdir="${build}"
> 	   debug="on">
> 	   <include name="*.java"/>
> 	   <exclude name="test/**"/>
> 	   <classpath
> path="l:/Java/build/;C:/ABI/arrays/lib/816classes12.zip;C:/ABI
> /arrays/lib/AppClasses.jar;C:/ABI/arrays/lib/castor-0.9.2-xml.
jar;C:/ABI/arrays/lib/classes12.zip;C:/ABI/arrays/lib/comm.jar;C:/ABI/arrays
/lib/corelib.jar;C:/ABI/arra>
ys/lib/crimson.jar;C:/ABI/arrays/lib/dta.jar;C:/ABI/arrays/lib
> /fmprtl.zip;C:/ABI/arrays/lib/jai_codec.jar;C:/ABI/arrays/lib/
> jai_core.jar;C:/ABI/arrays/lib/jaxp.jar;C:/ABI/arrays/lib/log4
> j.jar;C:/ABI/arrays/lib/mlibwrapper_jai.jar;C:/ABI/arrays/lib/
> nav.jar;C:/ABI/arrays/lib/reqres.jar;C:/ABI/arrays/lib/rtc.jar
> ;C:/ABI/arrays/lib/security.jar;C:/ABI/arrays/lib/sms.jar;C:/A
> BI/arrays/lib/Tools.jar;C:/ABI/arrays/lib/TOPLink.jar;C:/ABI/a
> rrays/lib/TOPLinkX.jar;C:/ABI/arrays/lib/xalan.jar;C:/ABI/arra
> ys/lib/xerces.jar;C:/JBoss-2.2.2/lib/jaas.jar;C:/JBoss-2.2.2/l
> ib/jaxp.jar;C:/JBoss-2.2.2/lib/jboss-jass.jar;C:/JBoss-2.2.2/l
> ib/jdbc2_0-stdext.jar;C:/JBoss-2.2.2/lib/jmxri.jar;C:/JBoss-2.
> 2.2/lib/xml.jar;C:/JBoss-2.2.2/lib/ext/ab-jnpserver.jar;C:/JBo
> ss-2.2.2/lib/ext/activation.jar;C:/JBoss-2.2.2/lib/ext/awt.jar
> ;C:/JBoss-2.2.2/lib/ext/classes12.zip;C:/JBoss-2.2.2/lib/ext/c
> onnector.jar;C:/JBoss-2.2.2/lib/ext/dynaserver.jar;C:/JBoss-2.
> 2.2/lib/ext/ejb.jar;C:/JBoss-2.2.2/lib/ext/ejb2.jar;C:/JBoss-2
> .2.2/lib/ext/ejxeditor.jar;C:/JBoss-2.2.2/lib/ext/ejxejb.jar;C
> :/JBoss-2.2.2/lib/ext/ejxjaws.jar;C:/JBoss-2.2.2/lib/ext/ejxjb
> oss.jar;C:/JBoss-2.2.2/lib/ext/exolabcore-0.1.jar;C:/JBoss-2.2
> .2/lib/ext/gnu-regexp-1.0.8.jar;C:/JBoss-2.2.2/lib/ext/hsql.ja
> r;C:/JBoss-2.2.2/lib/ext/idb.jar;C:/JBoss-2.2.2/lib/ext/jboss.
> jar;C:/JBoss-2.2.2/lib/ext/jbosscx-0.2.jar;C:/JBoss-2.2.2/lib/
> ext/jbossmq.jar;C:/JBoss-2.2.2/lib/ext/jbosssx.jar;C:/JBoss-2.
> 2.2/lib/ext/jdbm.jar;C:/JBoss-2.2.2/lib/ext/jetty-service.jar;
> C:/JBoss-2.2.2/lib/ext/jms.jar;C:/JBoss-2.2.2/lib/ext/jmxtools
> .jar;C:/JBoss-2.2.2/lib/ext/jndi.jar;C:/JBoss-2.2.2/lib/ext/jn
> pserver.jar;C:/JBoss-2.2.2/lib/ext/jpl-util-0_5b.jar;C:/JBoss-
> 2.2.2/lib/ext/jta-spec1_0_1.jar;C:/JBoss-2.2.2/lib/ext/log4j.j
> ar;C:/JBoss-2.2.2/lib/ext/log4j-old.jar;C:/JBoss-2.2.2/lib/ext
> /mail.jar;C:/JBoss-2..2.2/lib/ext/minerva-1_0b3.jar;C:/JBoss-2
> .2.2/lib/ext/openjms-client-patched-0.5.1.jar;C:/JBoss-2.2.2/l
> ib/ext/openjms-patched-0.5.1.jar;C:/JBoss-2.2.2/lib/ext/openjm
> s-pool.jar;C:/JBoss-2.2.2/lib/ext/openjms-rmi-patched-0.5.1.ja
> r;C:/JBoss-2.2.2/lib/ext/tomcat-service.jar;C:/JBoss-2.2.2/lib
> /ext/crimson.jar"/>
>     </javac>
>   </target>
> </project>
> 
> 

Mime
View raw message