How do I get Maven 2 to build 2 separate WAR files

后端 未结 8 2076
有刺的猬
有刺的猬 2020-12-29 15:34

When doing a mvn install I want to end up with 2 WAR files in my target directory. One will contain the production web.xml and the

8条回答
  •  误落风尘
    2020-12-29 16:33

    While I don't use Maven but Ivy instead, here's how you should generally do this:

    Have your own application published in to a private repository/similar as JAR with its dependencies/other static stuff and then individual project settings for building the application's deployment specific WARs with context specific configurations. Now by building any of the individual deployment projects you get the latest version of your actual application with its build specific configurations.

    I would assume that since this is trivial in Ivy, Maven should be able to do it just as easily.

提交回复
热议问题