• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

merge two war files into one

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

i have two war files that i deploy separately.
now instead of going through that pain i want to make one war file, deploying which would deploy those two wars. this can make life easier for other developers where they can just deploy one war instead of multiple.
I am using maven.

can anybody give ideas to approach this.
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. Don't.

By definition, a WAR is an atomic unit of deployment. The only way to make a deployable with multiple WARs in it would be to create an EAR file. That works for the full-service J2EE servers, but not for Tomcat. Tomcat can't handle EARs.

In any event, an EAR is a single webapp deployment itself, so it's not going to work very well for deploying multiple unrelated webapps.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since Maven places the contents of the WAR into target/project-name, why not create and ant script that builds a WAR from the two target/project-name directories? You could even embedded the ant script within a pom is you must use mvn.
 
Greenhorn
Posts: 1
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try to use assembly plugin.

Maven Assembly Plugin

neeravagl agl wrote:Hi everyone,

i have two war files that i deploy separately.
now instead of going through that pain i want to make one war file, deploying which would deploy those two wars. this can make life easier for other developers where they can just deploy one war instead of multiple.
I am using maven.

can anybody give ideas to approach this.

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there

I have the same issue, but I am not using Maven. I want to merge two war files by using ANT. Can anybody tell me how can I do that?
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
zabin, since your question is not the same as the original poster's please ask it in a new post.
 
Yeah. What he said. Totally. Wait. What? Sorry, I was looking at this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic