Maven: Build different WAR files of same project including different module dependencies -
i have maven project consisting of parent project , several modules, foo, bar, foobar , web.
<modules> <module>foo</module> <module>bar</module> <module>foobar</module> <module>web</module> </modules> web has foo, bar , foobar dependencies , built war. several reasons need build war contains foo , bar not foobar. best way achieve this? there possibility use maven profiles define different dependencies? or best solution add second war-building module (e.g. web2) without foobar dependency answer suggests: maven generating 2 different war files same project (see "multi module structure" in answer)
assuming artifact type of top level pom "pom", modules node aggregator , specifies build execution order - doesn't specify dependencies each child module are.
you can add web2 module @ bottom in parent pom, , in web2's pom can specify artifact type of war , dependencies of foo , bar. foo , bar included in war artifact, , foobar not.
Comments
Post a Comment