You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mike Garcia <mi...@yahoo.com> on 2000/11/14 17:28:17 UTC
Using ant for EJB jar creation
Hi fellow Developers,
Ant is really great but, I am having some problems while trying
to build an EJB. I have to invoke the java command on a vendor
specific EJB compiler in order to generate a deployable jar
file. Here is what I am doing in the target name="compile" tag:
<java classname="${ejbc}" fork="yes" jvmargs="${std_jar}
${wl_jar}">
<classpath path="${classpath}"/>
</java>
where <<ejbc>> is the vendor's ejb compiler class with the input
jar <<std_jar>> and output jar <<wl_jar>> as the 1st and 2nd
args. The two jar file properties are just paths to the
particular jar file.
When I try to run ant I get the following:
compile:
[javac] Compiling 4 source files to
C:\Z-Working\ejb\deployEJB
[jar] Building jar:
C:\Z-Working\ejb\jar\std_CompositionControllerEJB.jar
[java] java.lang.NoClassDefFoundError:
/jar\std_CompositionControllerEJB/jar
[java] Exception in thread "main"
[java] Result: 1
No matter what I try I seem to get the same error. The forked
process will not recognize the path to my jar files. The reason
I want to use a fork is because I create some temporary
directories for the build then, delete them after the build is
complete. My <target name="deploy" depends="compile"> and it
never gets to this step because of the
java.lang.NoClassDefFoundError.
Any advice would be much appreciated?
Cheers,
Mike
__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/
RE: Using ant for EJB jar creation
Posted by Conor MacNeill <co...@m64.com>.
Mike,
If I am right and you are using weblogic, you may want to read up about
the <ejbjar> optional task which may be able to do what you want.
For your particular problem, I think the answer will depend on what is
the value of ${classpath} in
>
> <java classname="${ejbc}" fork="yes" jvmargs="${std_jar}
> ${wl_jar}">
> <classpath path="${classpath}"/>
> </java>
>
Does it include classes that make up your EJB. The best thing may be to
run ant with -verbose to see how the EJB compiler is being invoked.
Conor