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.ejbdeploy/runtime/batch.jar"/> <pathelement location="${base.was.dir}/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime/codegen.jar"/> <pathelement location="${base.was.dir}/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime/ejbdeploy.jar"/> <pathelement location="${base.was.dir}/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime/ejbincrement.jar"/> <pathelement location="${base.was.dir}/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime/ejbvalidator.jar"/> <pathelement location="${base.was.dir}/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime/exec.jar"/> <pathelement location="${base.was.dir}/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/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