What is the true way of building multi-module maven project: via package
or via install
if NONE of the modules will be a dependency for another project? I think in this case package
is the only way to build it but I see how people IMO abuse the install
goal. And I don't get why.
Is there any official considerations on how the multi-module project should be built?
UPD: I have only one exp开发者_开发技巧lanation. Sometimes people just unaware of -pl
, -am
and -rf
maven options. Thus it leads them to install the modules' artifacts into repository when they want to build part of the reactor.
if none of the projects is a dependency of any other project you have a weird setup. why build them together if they don't belong together?
Sometimes people just unaware of -pl, -am and -rf maven options
in a normal setup, where there are dependencies between modules, these options (at least -rf
) don't work if the modules aren't installed.
OK, you are using a dependency management system without dependencies. Yes, you can use package
instead of install
. But you are not avoiding bad usage patterns, you are either missing out on features or grouping things together that don't belong together.
精彩评论