Multi-module project in maven

I have a multi-module project. Some modules are packaged in the form of wars, and some in banks.

When I start with the root module: mvn war:explodedI thought this would apply the step only to military projects. But he is trying to apply mvn war:explodedfor all projects that obviously do not work (no web.xml, etc.).

Any ideas how I can tell maven to apply only to military packaging modules?

+3
source share
1 answer

When launched war:war(which is the target for a packagemilitary-packing project), the military plug-in automatically creates a catalog of the exploded military file and then compresses it into the actual war file. So why don't you just start up mvn packageduring reactor assembly?

If this is actually not an option, you can use one of the maven parameters advanced reactor parameters , or rather:

-pl, --projects
      Build specific reactor designs instead of all projects

and specify only military modules.

+5
source

Source: https://habr.com/ru/post/1738704/


All Articles