I believe your problem lies in the <classpath> nested tag: <classpath refid="${project.classpath};${output_com}\com" />
The refid has to refer to the string literal name of the id of a (class)path tag. Ex. ... <path id="foo.classpath"> <!-- put all jars in the other.lib.dir into the javac.classpath --> <fileset dir="${other.lib.dir}"> <include name="**/*.jar" /> ... <ejbjar srcdir="${ejbjar.classes.dir}" destdir="${deploy.dir}" descriptordir="${project.root}/descrip" flatdestdir="true" genericjarsuffix=".jar"> <include name="**/*ejb-jar.xml" /> <classpath refid="foo.classpath" /> ... hope that helps Todd ----- Original Message ----- From: "Andrew Close" <[EMAIL PROTECTED]> To: "Ant Users List" <[EMAIL PROTECTED]> Sent: Thursday, November 01, 2001 4:03 PM Subject: RE: Ant & EJB > i'm currently getting the following error: > > build_ejb_jar: > > BUILD FAILED > > D:\Development\Marketing\build.xml:69: Reference > D:\java\lib\j2ee.jar;D:\WebGain\Bea\wlserver6.1lib\weblogic.jar;.;D:\Develop ment\Build\Marketing\Deployment\com > not found. > > using the build.xml down below. i'm not sure if i > have my references(classpath and such) set up > correctly. i did try running the build.xml without > the weblogic classpath tag and ejbc actually ran, but > it failed because it couldn't load superclasses. if > the classpath variable is set then ant doesn't seem to > find anything in it... any help would be appreciated. > and if you find i'm doing something grossly wrong or > just weird elsewhere in the script please feel free to > point it out to me. :) i'm always interested in > learning new and better ways to do things. thanks > again. > > andy > > > > build.xml: > > <project name="MKTG_LOCAL_BUILD" default="copy_ear" > basedir="."> > > <target name="init"> > <property name="src.dir" > value="D:\Development\Build\Marketing" /> > <property name="output_com" > value="${src.dir}\Deployment" /> > <property name="output_webappclasses" > value="${src.dir}\Deployment\WebApp\WEB-INF\classes" > /> > <property name="project.classpath" > value="D:\java\lib\j2ee.jar;D:\WebGain\Bea\wlserver6.1\lib\weblogic.jar;." > /> > <property name="dist" value="${output_com}" /> > > <property name="source.safe.dir" > value="D:\Program Files\Microsoft Visual > Studio\VSS\win32" /> > <property name="weblogic.deployment.dir" > value="D:\WebGain\Bea\wlserver6.1\config\mydomain\applications" > /> > </target> > > <target name="clean" depends="init"> > <delete dir="${src.dir}" /> > <delete dir="${output_com}" /> > <delete dir="${output_webappclasses}" /> > </target> > > <target name="prepare" depends="clean"> > <mkdir dir="${output_com}" /> > <mkdir dir="${output_webappclasses}" /> > <mkdir dir="${src.dir}" /> > </target> > > <target name="extract" depends="prepare"> > <vssget localPath="${src.dir}" > recursive="true" > login="LocalBuild, LocalBuild" > vsspath="/MKTG" > ssdir="${source.safe.dir}" > writable="false"/> > </target> > > <target name="compile_com" depends="extract"> > <javac srcdir="${src.dir}\SourceCode" > includes="com\**" > excludes="WebApp\**,WebAppClasses\**" > destdir="${output_com}" > > debug="on" > /> > <!--classpath="${project.classpath}"--> > <delete dir="${output_com}\WebAppClasses" /> > </target> > > <target name="compile_webappclasses" > depends="compile_com"> > <javac srcdir="${src.dir}\SourceCode" > includes="WebAppClasses\**" > excludes="com\**,WebApp\**" > destdir="${output_webappclasses}" > debug="on" > /> > <!-- > classpath="${project.classpath};${output_com}"--> > </target> > > <target name="copy_webapp" > depends="compile_webappclasses"> > <copy todir="${output_com}\WebApp" > > <fileset dir="${src.dir}\SourceCode\WebApp\" > > <exclude name="**\*.java"/> > </fileset> > </copy> > </target> > > <target name="build_ejb_jar" depends="copy_webapp"> > > <ejbjar > descriptordir="${output_com}\META-INF" > srcdir="${output_com}\com" > destdir="${output_com}\Ear" > basejarname="ejb_mkt"> > <weblogic > destdir="${output_com}\Ear" > newCMP="true" > noEJBC="false"> > <classpath > refid="${project.classpath};${output_com}\com" /> > </weblogic> > <include name="**\ejb-jar.xml"/> > <exclude name="**\weblogic*.xml"/> > </ejbjar> > </target> > > <target name="build_war" depends="build_ejb_jar"> > <war warfile="${dist}\ear\mkt.war" > webxml="${src.dir}\Deployment\WebApp\Web-inf\web.xml"> > <fileset > dir="${src.dir}\deployment\WebApp"/> > </war> > </target> > > <target name="build_ear" depends="build_war"> > <jar jarfile="${dist}\mkt.ear" > basedir="${dist}\ear\" > /> > </target> > > <target name="copy_ear" depends="build_ear"> > <copy todir="${weblogic.deployment.dir}"> > <fileset dir="${dist}"> > <include name="mkt.ear"/> > </fileset> > </copy> > </target> > > </project> > > > --- "Mercado, Tony" <[EMAIL PROTECTED]> wrote: > > Andrew, > > > > The following example successfully builds a number > > of EJB's using ejbjar (I > > changed actual names we use in our project): > > > > > > <target name="ejbs" depends="init"> > > > > <ejbjar > > descriptordir="${src.dir}/xml/META-INF" > > srcdir="${dev.classes.dir}" > > destdir="${dev.ejb.dir}" > > basejarname="serviceEJB"> > > <weblogic destdir="${dev.ejb.dir}" > > newCMP="true"> > > <classpath refid="project.classpath" /> > > </weblogic> > > <include name="**/ejb-jar.xml"/> > > <exclude name="**/weblogic*.xml"/> > > </ejbjar> > > > > </target> > > > > > > This small snippet of ant assumes that you have two > > files in > > ${src.dir}/xml/META-INF. Specifically, ejb-jar.xml > > & weblogic-ejb-jar.xml. > > Note that I am also using a number of other > > "references" in this example: > > project.classpath, as well as the references to the > > directories. These > > "references" need to be set prior to their use. > > > > Good Luck! > > > > Tony Mercado > > KMV, LLC > > 415.352.3046 > > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > > > > > > __________________________________________________ > Do You Yahoo!? > Make a great connection at Yahoo! Personals. > http://personals.yahoo.com > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>