This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mutiple war files from single POM

 
Dorothy Taylor
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I am quite new to maven and seek a help. Is it possible that from maven i am able to build 2 sets of jars and create 2 war files one with each set of jar? The problem is that I want to create the 2 war files using a single POM
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dorothy,

In short: Not with one pom.xml. Maven is a "One Artifact per POM" mechanism. You'll need to have a separate pom for your other WAR.

Note: You can use a parent pom to list the two JAR and 2 WAR poms so that you can build them all in one go...
 
Yuriy Fuksenko
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, it is possible, but only one of them would be referable by other project as dependency.
The simplest way would be to define multiple executions for plugins in the build section.
It s just not recommended practice.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic