ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cameron Fieber <cfie...@signalsoftcorp.com>
Subject Re: <ejbjar> task question
Date Thu, 08 Feb 2001 22:51:21 GMT
I figured out my problem.  In the <ejbjar> task, I was not using an 
include to filter out a specific XML deployment descriptor for the JAR 
since I thought if I followed the naming convention of 
BaseJarName-ejb-jar.xml it would just use that.  Adding a specific 
include fixed my problem.

I do, however, seem to have run into another problem.  The generated jar 
files do not include a MANIFEST.MF file in the META-INF directory.  The 
Sun J2SDKEE deploytool fails to load the EJB jars until I unjar and 
rejar them to get the MANIFEST.MF file there.

Regards,

Cameron

-- 
Cameron Fieber
Software Developer
SignalSoft Canada

Cameron Fieber wrote:

> Greetings,
> 
> I have just started using Ant, and am trying to set up a build 
> environment for our EJB development.  I have each EJB building as a 
> separate target, but when I run the <ejbjar> task, I get a number of 
> messages that "[ejbjar] Could not load class XXXX for super class check".
> 
> The reason this concerns me, is that all the class names mentioned are 
> the Home, Remote, and Bean implementation classes for a bunch of the 
> other entities.  None of the entities are referenced by the entity I 
> am building, so I am wondering where that check is coming from.  I can 
> get more or less messages by modifying the <classpath> element within 
> the <ejbjar> task.
> 
> Here is my build file with just one of the targets I am using.  I have 
> a directory for my resulting class files on the initial compile, which 
> contains all the dependant classes for my EJB.  In the <ejbjar> task, 
> I reference the directory I compile into, and include it's content as 
> <support> for the EJB Jar.
> 
> I have my ANT_HOME and JAVA_HOME set, but no CLASSPATH environment 
> variable.
> 
> Regards,
> 
> Cameron
> 
> -- 
> Cameron Fieber
> Software Developer
> SignalSoft Canada
> 
> <?xml version="1.0"?>
> 
> <project name="BFound" default="user" basedir=".">
> 
>   <property name="lib.dir" value="../lib" />
>   <property name="j2ee.jar" value="${lib.dir}/j2ee.jar" />
>   <property name="xerces.jar" value="${lib.dir}/xerces.jar" />
>   <property name="src.dir" value="../src" />
>   <property name="build.dir" value="../classes2" />
>   <property name="descriptor.dir" value="../descriptors" />
>   <property name="ejb-jar.dir" value="../ejb-jar" />
>   <path id="cpath">             <pathelement path="${j2ee.jar}" />
>   </path>
> 
>   <target name="user">
>       <mkdir dir="${build.dir}/user" />
>       <javac srcdir="${src.dir}" destdir="${build.dir}/user">
>           <classpath>
>               <path refid="cpath" />
>           </classpath>
>           <include 
> name="com/signalsoftcorp/bfound/entity/user/User.java" />
>           <include 
> name="com/signalsoftcorp/bfound/entity/user/UserHome.java" />
>           <include 
> name="com/signalsoftcorp/bfound/entity/user/SecureUserBean.java" />
>       </javac>
>       <ejbjar descriptordir="${descriptor.dir}" 
> srcdir="${build.dir}/user" destdir="${ejb-jar.dir}" basejarname="User">
>           <classpath>
>               <pathelement path="${build.dir}/user" />
>               <path refid="cpath" />
>           </classpath>
>           <support dir="${build.dir}/user"/>
>       </ejbjar>
>   </target>
> 
>   <target name="clean">
>       <delete>
>           <fileset dir="${build.dir}">
>               <include name="**/*.class" />
>           </fileset>
>       </delete>
>   </target>
> </project>




Mime
View raw message