You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Brian Sheehan <bs...@tranetics.com> on 2001/08/10 12:42:59 UTC
task & nested element
Hi,
I'm trying to use the <ejbjar> task (with the nested <weblogic> task). The
ejb I want to build uses several other utility classes from my build tree,
so these need to be included in the EJB jar file that is output. According
to the documentation, I should specify these files using the nested
<support> element of the <ejbjar> task. I am not sure exactly how to do
this, and the target given below gives this error:
Buildfile: build.xml
spEJB:
[ejbjar] Could not load class utility1 for super class check
[ejbjar] Could not load class utility2 for super class check
[ejbjar] Could not load class utility3 for super class check
[ejbjar] building someEJB.jar with 8 files
[ejbc] [EJB]: Creating output jar:E:\CompanyName\ejbs\someEJB.jar
[ejbjar] Could not load class utility1 for super class check
[ejbjar] Could not load class utility2 for super class check
[ejbjar] Could not load class utility3 for super class check
BUILD SUCCESSFUL
Total time: 13 seconds
excerpt from build.xml:
<property name="ejb_deploy.dir" value="E:\CompanyName\ejbs"/>
<target name="someEJBtarget">
<ejbjar srcdir="${build.dir}"
descriptordir="${src.dir}/ejbs/someEJBdir"
<include name="**/*-ejb-jar.xml"/>
<support dir="${build.dir}/com/CompanyName/packageX"
includes="utility1.class, utility2.class,utility3.class"/>
<weblogic destdir="${ejb_deploy.dir}">
<classpath>
<pathelement location="${java_home.dir}/lib/tools.jar"/>
<pathelement location="${wl_home.dir}/classes"/>
<pathelement location="${wl_home.dir}/lib/tools.jar"/>
<pathelement location="${wl_home.dir}/lib/weblogicaux.jar" />
<pathelement location="${build.dir}" />
</classpath>
</weblogic>
</ejbjar>
</target>
Any help would be appreciated - it would be a big help to know how the
nested <support> element should work, as I'm only guessing at the moment.
Also, should I be doing something with the classpath attribute of the
<ejbjar> task?
Brian Sheehan
Tranetics
www: http://www.tranetics.com/
----------------------------------------------
This e-mail is confidential and may also be
privileged. If you are not the intended
recipient, please notify us immediately by
telephoning +353-(0)21-4877780. You should
not copy or use it for any other purpose,
nor disclose its contents to any other person.
In messages of non-business nature, the views
and opinions expressed are the author's own
and do not necessarily reflect the views and
opinions of the Company.
----------------------------------------------
Re: task & nested element
Posted by Brian Sheehan <bs...@tranetics.com>.
Sorry, I forgot to mention that when the archive is created it actually
contains the the files specifed by the <support> element, but just in the
root of the jar, not in com/CompanyName/PackageX/ where they should be.
----- Original Message -----
From: "Brian Sheehan" <bs...@tranetics.com>
To: <an...@jakarta.apache.org>
Sent: Friday, August 10, 2001 11:42 AM
Subject: <ejbjar> task & nested <support> element
> Hi,
> I'm trying to use the <ejbjar> task (with the nested <weblogic> task). The
> ejb I want to build uses several other utility classes from my build tree,
> so these need to be included in the EJB jar file that is output. According
> to the documentation, I should specify these files using the nested
> <support> element of the <ejbjar> task. I am not sure exactly how to do
> this, and the target given below gives this error:
>
> Buildfile: build.xml
>
> spEJB:
> [ejbjar] Could not load class utility1 for super class check
> [ejbjar] Could not load class utility2 for super class check
> [ejbjar] Could not load class utility3 for super class check
> [ejbjar] building someEJB.jar with 8 files
> [ejbc] [EJB]: Creating output jar:E:\CompanyName\ejbs\someEJB.jar
>
> [ejbjar] Could not load class utility1 for super class check
> [ejbjar] Could not load class utility2 for super class check
> [ejbjar] Could not load class utility3 for super class check
>
> BUILD SUCCESSFUL
>
> Total time: 13 seconds
>
>
> excerpt from build.xml:
>
> <property name="ejb_deploy.dir" value="E:\CompanyName\ejbs"/>
>
> <target name="someEJBtarget">
> <ejbjar srcdir="${build.dir}"
> descriptordir="${src.dir}/ejbs/someEJBdir"
> <include name="**/*-ejb-jar.xml"/>
> <support dir="${build.dir}/com/CompanyName/packageX"
> includes="utility1.class, utility2.class,utility3.class"/>
> <weblogic destdir="${ejb_deploy.dir}">
> <classpath>
> <pathelement location="${java_home.dir}/lib/tools.jar"/>
> <pathelement location="${wl_home.dir}/classes"/>
> <pathelement location="${wl_home.dir}/lib/tools.jar"/>
> <pathelement location="${wl_home.dir}/lib/weblogicaux.jar" />
> <pathelement location="${build.dir}" />
> </classpath>
> </weblogic>
> </ejbjar>
> </target>
>
>
> Any help would be appreciated - it would be a big help to know how the
> nested <support> element should work, as I'm only guessing at the moment.
> Also, should I be doing something with the classpath attribute of the
> <ejbjar> task?
>
> Brian Sheehan
> Tranetics
>
> www: http://www.tranetics.com/
>
> ----------------------------------------------
> This e-mail is confidential and may also be
> privileged. If you are not the intended
> recipient, please notify us immediately by
> telephoning +353-(0)21-4877780. You should
> not copy or use it for any other purpose,
> nor disclose its contents to any other person.
> In messages of non-business nature, the views
> and opinions expressed are the author's own
> and do not necessarily reflect the views and
> opinions of the Company.
> ----------------------------------------------
>
>
>
Re: task & nested element FOUND FIX
Posted by Brian Sheehan <bs...@tranetics.com>.
the target below works perfectly if the contents of the <support> element
are changed to:
<support dir="${build.dir}"
includes="com/CompanyName/packageX/utility1.class,
com/CompanyName/packageX/utility2.class,
com/CompanyName/packageXutility3.class"/>
i.e. the dir attribute should be set to the root of the build tree, and all
the includes should give the paths to the required files relative to that.
Brian
----- Original Message -----
From: "Brian Sheehan" <bs...@tranetics.com>
To: <an...@jakarta.apache.org>
Sent: Friday, August 10, 2001 11:42 AM
Subject: <ejbjar> task & nested <support> element
> Hi,
> I'm trying to use the <ejbjar> task (with the nested <weblogic> task). The
> ejb I want to build uses several other utility classes from my build tree,
> so these need to be included in the EJB jar file that is output. According
> to the documentation, I should specify these files using the nested
> <support> element of the <ejbjar> task. I am not sure exactly how to do
> this, and the target given below gives this error:
>
> Buildfile: build.xml
>
> spEJB:
> [ejbjar] Could not load class utility1 for super class check
> [ejbjar] Could not load class utility2 for super class check
> [ejbjar] Could not load class utility3 for super class check
> [ejbjar] building someEJB.jar with 8 files
> [ejbc] [EJB]: Creating output jar:E:\CompanyName\ejbs\someEJB.jar
>
> [ejbjar] Could not load class utility1 for super class check
> [ejbjar] Could not load class utility2 for super class check
> [ejbjar] Could not load class utility3 for super class check
>
> BUILD SUCCESSFUL
>
> Total time: 13 seconds
>
>
> excerpt from build.xml:
>
> <property name="ejb_deploy.dir" value="E:\CompanyName\ejbs"/>
>
> <target name="someEJBtarget">
> <ejbjar srcdir="${build.dir}"
> descriptordir="${src.dir}/ejbs/someEJBdir"
> <include name="**/*-ejb-jar.xml"/>
> <support dir="${build.dir}/com/CompanyName/packageX"
> includes="utility1.class, utility2.class,utility3.class"/>
> <weblogic destdir="${ejb_deploy.dir}">
> <classpath>
> <pathelement location="${java_home.dir}/lib/tools.jar"/>
> <pathelement location="${wl_home.dir}/classes"/>
> <pathelement location="${wl_home.dir}/lib/tools.jar"/>
> <pathelement location="${wl_home.dir}/lib/weblogicaux.jar" />
> <pathelement location="${build.dir}" />
> </classpath>
> </weblogic>
> </ejbjar>
> </target>
>
>
> Any help would be appreciated - it would be a big help to know how the
> nested <support> element should work, as I'm only guessing at the moment.
> Also, should I be doing something with the classpath attribute of the
> <ejbjar> task?
>
> Brian Sheehan
> Tranetics
>
> www: http://www.tranetics.com/
>
> ----------------------------------------------
> This e-mail is confidential and may also be
> privileged. If you are not the intended
> recipient, please notify us immediately by
> telephoning +353-(0)21-4877780. You should
> not copy or use it for any other purpose,
> nor disclose its contents to any other person.
> In messages of non-business nature, the views
> and opinions expressed are the author's own
> and do not necessarily reflect the views and
> opinions of the Company.
> ----------------------------------------------
>
>
>