aspose file tools*
The moose likes Websphere and the fly likes how to merge war file and ear file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "how to merge war file and ear file?" Watch "how to merge war file and ear file?" New topic
Author

how to merge war file and ear file?

rick collette
Ranch Hand

Joined: Mar 22, 2002
Posts: 208
Hi, guys:

I have a war file which includes web modules and a ear file which includes
enterprise modules. Before I deploy them to websphere, I need to merge them
into one ear file. I am wondering if there is any simple way to do that?

thanks
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3716
    
    5

WAR files go inside EAR files.


My Blog: Down Home Country Coding with Scott Selikoff
rick collette
Ranch Hand

Joined: Mar 22, 2002
Posts: 208
Thanks.

Yes, I know war file should go inside ear file.
But how to do that? Is there a simple command to do that?

Originally posted by Scott Selikoff:
WAR files go inside EAR files.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18997
    
  40

Originally posted by rick collette:
Thanks.

Yes, I know war file should go inside ear file.
But how to do that? Is there a simple command to do that?



The "jar" command can be used to list, extract, and create jar, war, and ear files. I guess you can extract the ear file, copy in the war file, and bundle it up again. BTW, just don't forget to use the "M" option, when creating the ear file -- as you don't want a manifest.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
rick collette
Ranch Hand

Joined: Mar 22, 2002
Posts: 208
Thanks a lot, Henry. That solved my problem.


Originally posted by Henry Wong:


The "jar" command can be used to list, extract, and create jar, war, and ear files. I guess you can extract the ear file, copy in the war file, and bundle it up again. BTW, just don't forget to use the "M" option, when creating the ear file -- as you don't want a manifest.

Henry
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3716
    
    5

Originally posted by rick collette:
Thanks.

Yes, I know war file should go inside ear file.
But how to do that? Is there a simple command to do that?

I just use tools like Winzip/Winrar to drag and drop WARs inside of existing EARs. Then, you just update the EAR's application.xml with a line or two of text.
radha mannava
Greenhorn

Joined: Jan 24, 2006
Posts: 18
In wsad, go to your enterprise application, open applicaiton.xml,click on modules -details,click on add, it would show all other app modules with in your workspace..add the module you want to include in your application..
Hope this helps.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to merge war file and ear file?