Multi-module project in maven
I have some multi-module project. Some modules are packaged as wars a开发者_运维百科nd some as jars.
When I start from the root module : mvn war:exploded
I thought it would apply the step only to the war projects. But it tries to apply the mvn war:exploded
on all the projects which obviously fails (no web.xml and so on).
Any ideas how can I tell maven to apply in only to the war packaging modules?
When running war:war
(which is the goal bound to package
for a project with a war packaging), the war plugin automatically creates a directory of the exploded war file first and then compresses it into the actual war file. So why don't you simply run mvn package
during your reactor build?
If really this is not an option, you could maybe use one of maven's advanced reactor options, and more precisely:
-pl, --projects
Build specified reactor projects instead of all projects
and list only the war modules.
精彩评论