Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » J2EE Interest »

Re: How to make a ear file?

Mike New

2005-07-19

Replies:

Edward King wrote:
I have some files in following directory:

The structure of web archieves files 'jsps.war' is follows:
main.jsp
WEB-INF/
   web.xml
   weblogic.xml
   classes/
      factory/
         order.class
         ......
         model.class

I have an another files,like follows;
META-INF/
   application.xml

application.xml is following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
<application>
  <display-name></display-name>
  <module>
    <ejb>ejbs.jar</ejb>
  </module>
  <module>
    <web>
      <web-uri>jsps.war</web-uri>
      <context-root>factory</context-root>
    </web>
  </module>
</application>

I know I can use follows commands to make a jar file:
jar cvf ejbs.jar *.jsp /WEB-INF/*.*

But I don't know how to make a war file and  how to make a ear file?  Which command I can use?
Assuming you want to do it on the command line, you use the jar command:

jar cvf mywar.war *.jsp /WEB-INF/*.*

or

jar cvf mywar.ear [etc]

Mike

Thanks in advance!
=========================================================================== To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@java.sun.com and include in the body of the message "help".


=========================================================================== To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@java.sun.com and include in the body of the message "help".

From owner-j2ee-interest@JAVA.SUN.COM Tue, 19 Jul 2005 23:39:23 Return-Path: Delivery-Date: Tue, 19 Jul 2005 23:39:34 -0400 Received: from [192.18.99.108] (helo=swjscmail2.java.sun.com) by mx.perfora.net with ESMTP (Nemesis), id 0MKvAI-1Dv5Qk2qS6-0006Yp for java@JUNLU.COM; Tue, 19 Jul 2005 23:39:34 -0400 Received: from swjscmail1 (swjscmail1.Sun.COM [192.18.99.107]) by swjscmail2.java.sun.com (Postfix) with ESMTP id 21DB0216C2; Tue, 19 Jul 2005 21:31:13 -0600 (MDT) Received: from JAVA.SUN.COM by JAVA.SUN.COM (LISTSERV-TCP/IP release 1.8e) with spool id 70010477 for J2EE-INTEREST@JAVA.SUN.COM; Tue, 19 Jul 2005 21:24:52 -0600 X-Original-To: j2ee-interest@java.sun.com Delivered-To: j2ee-interest@java.sun.com Received: from webmail-outgoing.us4.outblaze.com (webmail-outgoing.us4.outblaze.com [205.158.62.67]) by swjscmail1.java.sun.com (Postfix) with ESMTP id 664854928 for ; Tue, 19 Jul 2005 21:24:52 -0600 (MDT) Received: from unknown (unknown [192.168.9.180]) by webmail-outgoing.us4.outblaze.com (Postfix) with QMQP id 920DC18001CA for ; Wed, 20 Jul 2005 03:39:23 +0000 (GMT) X-OB-Received: from unknown (205.158.62.81) by wfilter.us4.outblaze.com; 20 Jul 2005 03:39:23 -0000 Received: by ws1-2.us4.outblaze.com (Postfix, from userid 1001) id 8550E1F50B1; Wed, 20 Jul 2005 03:39:23 +0000 (GMT) Content-Transfer-Encoding: 7bit Content-Type: multipart/alternative; boundary="_----------=_1121830763308391" MIME-Version: 1.0 Received: from [212.72.22.74] by ws1-2.us4.outblaze.com with http for rejimohamed@techie.com; Tue, 19 Jul 2005 22:39:23 -0500 X-Originating-Ip: 212.72.22.74 X-Originating-Server: ws1-2.us4.outblaze.com Message-ID: <20050720033923.8550E1F50B1@ws1-2.us4.outblaze.com> Date: Tue, 19 Jul 2005 22:39:23 -0500 Reply-To: "A mailing list for Java(tm) 2 Platform, Enterprise Edition" Sender: "A mailing list for Java(tm) 2 Platform, Enterprise Edition" From: Reji Mohamed Subject: Re: How to make a ear file? To: J2EE-INTEREST@JAVA.SUN.COM Precedence: list Envelope-To: java@JUNLU.COM This is a multi-part message in MIME format. --_----------=_1121830763308391 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="gb2312" try this, regs, reji ----- Original Message ----- From: "Michael New" To: J2EE-INTEREST@JAVA.SUN.COM Subject: Re: How to make a ear file? Date: Tue, 19 Jul 2005 21:39:22 -0400 Edward King wrote: I have some files in following directory: The structure of web archieves files 'jsps.war' is follows: main.jsp WEB-INF/ web.xml weblogic.xml classes/ factory/ order.class ...... model.class I have an another files,like follows; META-INF/ application.xml application.xml is following: ejbs.jar jsps.war factory I know I can use follows commands to make a jar file: jar cvf ejbs.jar *.jsp /WEB-INF/*.* But I don't know how to make a war file and how to make a ear file?=20 Which command I can use? Assuming you want to do it on the command line, you use the jar command: jar cvf mywar.war *.jsp /WEB-INF/*.* or jar cvf mywar.ear [etc] Mike Thanks in advance! =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@java.sun.com and include in the body of the message "help". =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@java.sun.com and include in the body of the message "help". --=20 ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@java.sun.com and include in the body of the message "help". --_----------=_1121830763308391 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="gb2312"

try this,

<target name=3D"createear">
  <ear earfile=3D"/mye= arfile.ear" appxml=3D"./application.xml">
   <files= et dir=3D"${jardir}" includes=3D"*.jar"/>
   <files= et dir=3D"${wardir}" includes=3D"mywarfile.war"/>
   &= lt;fileset dir=3D"${otherjarsdir}" includes=3D"*.jar" />
  = </ear>
 </target>

regs,

reji

----- Original Message -----
From: "Michael New"
To: J2EE-INTEREST@JAVA.SUN.COM
Subject: Re: How to make a e= ar file?
Date: Tue, 19 Jul 2005 21:39:22 -0400

Edward King wrote:= =20
I have some files in following directory:

The structure of web = archieves files 'jsps.war' is follows:
main.jsp
WEB-INF/
 &nb= sp; web.xml
   weblogic.xml
   classes/
 =      factory/
      &n= bsp;  order.class
         = ......
         model.class
<= BR>I have an another files,like follows;
META-INF/
   appli= cation.xml

application.xml is following:
<?xml version=3D"1.0"= encoding=3D"UTF-8"?>
<!DOCTYPE application PUBLIC '-//Sun Microsy= stems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.su= n.com/j2ee/dtds/application_1_2.dtd'>
<application>
&nbs= p; <display-name></display-name>
  <module>
&n= bsp;   <ejb>ejbs.jar</ejb>
  </module><= BR>  <module>
    <web>
  &= nbsp;   <web-uri>jsps.war</web-uri>
  &n= bsp;   <context-root>factory</context-root>
 =    </web>
  </module>
</application>=

I know I can use follows commands to make a jar file:
jar cvf ej= bs.jar *.jsp /WEB-INF/*.*

But I don't know how to make a war file a= nd  how to make a ear file?  Which command I can use?
Assuming you want to do it on the command line, you use the jar = command:

jar cvf mywar.war *.jsp /WEB-INF/*.*

or

jar = cvf mywar.ear [etc]

Mike

Thanks in advance!
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D To unsubscribe, send email to listse= rv@java.sun.com and include in the body of the message "signoff J2EE-IN= TEREST". For general help, send email to listserv@java.sun.com and inclu= de in the body of the message "help".


=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D To unsubscribe= , send email to listserv@java.sun.com and include in the body of the messag= e "signoff J2EE-INTEREST". For general help, send email to listserv@java.su= n.com and include in the body of the message "help".=20


--=20

___________________________________________________________
Sign-up f= or Ads Free at Mail.com
http://www.mail.com/?sr=3Dsignup

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@java.sun.com and include in the body of the message "help".

--_----------=_1121830763308391--

©2008 junlu.com - Jax Systems, LLC, U.S.A.