You can use the jar task in ant to create an ear file is it is just a jar
file with the .ear extension. Below is two example tasks one to create the
war file and one to create the ear file.
<target name="war">
<copy file="dist/lib/classes.jar" todir="${web.dir}/WEB-INF/lib"/>
<jar jarfile="dist/lib/site.war" basedir="${web.dir}"/>
</target>
<target name="ear" depends="war">
<jar jarfile="dist/lib/application.ear">
<fileset dir="dist/lib/ejb" includes="*.jar"/>
<fileset dir="dist/lib" includes="site.war"/>
<fileset dir="src" includes="META-INF/application.xml"/>
</jar>
</target>
For this example to work you will need to put all you servlet and helper
classes in the classes.jar file in the dist/lib directory and all of your
ejb jar files in the dist/lib/ejb directory. The following is an example of
the META-INF/application.xml ear config file in the src directory.
<?xml version="1.0" encoding="ISO-8859-1"?>
<application>
<display-name>Nhigh Windsurfing</display-name>
<module>
<web>
<web-uri>site.war</web-uri>
<context-root>/</context-root>
</web>
</module>
<module>
<ejb>ejb1.jar</ejb>
</module>
<module>
<ejb>ejb2.jar</ejb>
</module>
</application>
Hope this helps,
Paul
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Per Lewau
Sent: 23 May 2001 12:33
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] tools for ear
On Wed, 23 May 2001, Jim Downing wrote:
> Yes, Ant can. The ejbjar task is one of the optional tasks.
AFAIK that task only produces ejb jars and not ear files. An ear file is
trivial to create with a little copy and the ordinary jar task. Building
the modules contained in the ear file can be done with the ejbjar and war
tasks.
>
> jim
>
> ----- Original Message -----
> From: "ALex Loubyansky" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, May 23, 2001 11:24 AM
> Subject: [JBoss-user] tools for ear
>
>
> > Hello!
> >
> > can anyone suggest me a tool for creating ear files? can Ant create ear
> > files?
> >
> > thanks
> >
> > ALex
> >
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> >
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
-----------------------------------------------------------------------
Per Lewau ([EMAIL PROTECTED])
"Why waste time learning, when ignorance is instantaneous?"
- Hobbes
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user