Wrox Home  
Search P2P Archive for: Go

  Return to Index  

j2ee thread: How to create a ear file. I have a war file.


Message #1 by "Lakshmi" <lbalasubramanyam@y...> on Thu, 19 Sep 2002 14:42:58
2 ways' to make an .war(or .ear) file

(1) u can use the ant tool to build the .war(or .ear)
file 

in build.xml file to create .ear file from existing
.jar file

<target name="ear_app" depends="jar_ejb">
<ear earfile="${APPLICATIONS}/application.ear">
<fileset dir="${dist}" includes="application.jar"/>
</ear>
</target>

about the .war file

  <target name="all" depends="compile">

    <war warfile="${application.war}"
webxml="web.xml">
      <fileset dir="web"/>
      <webinf dir="etc"/>
      <lib dir="lib"/>
      <classes dir="class"/>
      <classes dir="resource"/>
    </war>
  </target>

(2) way

> jar -cvf application.war /../../*.class
../../*.gif..

>  jar -cvf application.war /../../*.class
../../*.gif.


i guess this will help u...

-
riyaz


 












--- Lakshmi <lbalasubramanyam@y...> wrote:
> I have an web application with no ejb's. The
> directory structure of my web-
> app is
> 
> +app
>   +WEB-INF
>     +classes(all java class files in this folder).
>     +properties
>   +stylesheets(has the all the stylesheets)
>   +media(all the gifs)
> 
> If I have to make an "ear" file using the jar
> utility what shall be 
> contained in my application.xml file? And in which
> directory do I need to 
> be in to run the jar command(should I run the tool
> from the "app" folder? 
> or in the the "app" folder's parent directory). what
> parameters do I need 
> to send in to the jar utility?
> 
> thanks very much for any help.
> -Nandini


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

  Return to Index