Will this build script be imported into each project's script?

You can always add a target like "display-classpath" or something like
that that just echo's it to the screen.  This could be useful to some.

Ben

-----Original Message-----
From: Uri Zeituni [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 01, 2005 9:59 AM
To: Ant User list (E-mail)
Subject: Classpath in external file

Hi,
I have a situation where I have a few projects, each one have its own
build, but all use the same classpath reference for compilation.
I have a huge classpath defined, and I don't want to repeat it in every
single script. What I did so far is to define the classpath in a certain
project and then import it in every other project. This is not possible
for me anymore, as the projects structure is about to change. I can not
use the classapth alone in a file, because ANT requires a target within
a script. 
Does anyone have any idea how to solve this issue?

Here is an example of my classpath:

        <path id="scm.classpath">
                <pathelement location="${root}/../../EXTERNAL
JARS/barcode4j/barcode4j.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/DB2/db2java.zip"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/DB2/db2jcc.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/jcs/commons-collections-3.1.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/jcs/jcs-1.1.3-dev.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/jcs/commons-lang-2.0.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/js/js.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/log4j/log4j-1.2.8.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/xalan-j_2_6_0/bin/xalan.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/xerces-2_6_2/resolver.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/xerces-2_6_2/xercesImpl.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/xerces-2_6_2/xml-apis.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/xerces-2_6_2/xmlParserAPIs.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/axis/axis.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/axis/jaxrpc.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/Junit/junit.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/quartz/quartz.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/castor/castor-0.9.5.3-xml.jar"/>
                <pathelement location="${root}/../../EXTERNAL
JARS/algorithms/SCMAlg.jar"/>
                <pathelement location="${root}/../../SCM
JARS/re-ejb.jar"/>
                <pathelement location="${root}/../../SCM
JARS/re-other.jar"/>
        </path>
        <path id="wsad.ejbdeploy.classpath">
                <pathelement
location="${base.wsad}/lib/deployutils.jar"/>
                <pathelement
location="${base.wsad}/lib/wsanttasks.jar"/>
                <pathelement
location="${base.wsad}/java/jre/lib/ext/ibmorb.jar"/>
                <pathelement
location="${base.wsad.deploy.dir}/batch.jar"/>
                <pathelement
location="${base.wsad.deploy.dir}/codegen.jar"/>
                <pathelement
location="${base.wsad.deploy.dir}/ejbdeploy.jar"/>
                <pathelement
location="${base.wsad.deploy.dir}/ejbincrement.jar"/>
                <pathelement
location="${base.wsad.deploy.dir}/ejbvalidator.jar"/>
                <pathelement
location="${base.wsad.deploy.dir}/exec.jar"/>
                <pathelement
location="${base.wsad.deploy.dir}/rmic.jar"/>
        </path>
        <path id="was.ejbdeploy.classpath">
                <pathelement
location="${base.was.dir}/lib/deployutils.jar"/>
                <pathelement
location="${base.was.dir}/lib/wsanttasks.jar"/>
                <pathelement
location="${base.was.dir}/java/jre/lib/ext/ibmorb.jar"/>
                <pathelement
location="${base.was.dir}/deploytool/itp/plugins/com.ibm.etools.ejbdeplo
y/runtime/batch.jar"/>
                <pathelement
location="${base.was.dir}/deploytool/itp/plugins/com.ibm.etools.ejbdeplo
y/runtime/codegen.jar"/>
                <pathelement
location="${base.was.dir}/deploytool/itp/plugins/com.ibm.etools.ejbdeplo
y/runtime/ejbdeploy.jar"/>
                <pathelement
location="${base.was.dir}/deploytool/itp/plugins/com.ibm.etools.ejbdeplo
y/runtime/ejbincrement.jar"/>
                <pathelement
location="${base.was.dir}/deploytool/itp/plugins/com.ibm.etools.ejbdeplo
y/runtime/ejbvalidator.jar"/>
                <pathelement
location="${base.was.dir}/deploytool/itp/plugins/com.ibm.etools.ejbdeplo
y/runtime/exec.jar"/>
                <pathelement
location="${base.was.dir}/deploytool/itp/plugins/com.ibm.etools.ejbdeplo
y/runtime/rmic.jar"/>
        </path>
        <path id="websphere.java.lib">
                <pathelement location="${j2ee.compiler.lib}/j2ee.jar"/>
                <pathelement
location="${j2ee.compiler.lib}/runtime.jar"/>
                <pathelement
location="${j2ee.compiler.lib}/ecutils.jar"/>
                <pathelement
location="${j2ee.compiler.lib}/ejbcontainer.jar"/>
                <pathelement location="${j2ee.compiler.lib}/ras.jar"/>
                <pathelement
location="${j2ee.compiler.lib}/ejbportable.jar"/>
        </path>

Many thanks,
Zeituni


**************************************************************
This message, including any attachments, contains confidential information 
intended for a specific individual and purpose, and is protected by law.  If 
you are not the intended recipient, please contact sender immediately by reply 
e-mail and destroy all copies.  You are hereby notified that any disclosure, 
copying, or distribution of this message, or the taking of any action based on 
it, is strictly prohibited.
TIAA-CREF
**************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to