Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

how to merge war file and ear file?

 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
author
Posts: 4107
28
Google Web Toolkit Eclipse IDE Flex
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WAR files go inside EAR files.
 
rick collette
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
author
Posts: 23834
140
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
rick collette
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4107
28
Google Web Toolkit Eclipse IDE Flex
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!