Norbert, You may want to attach your project here for others to look at:
https://jira.codehaus.org/browse/MNG-5597 On Mar 10, 2014, at 7:54 AM, Norbert Wnuk <[email protected]> wrote: > Hi All, > I would like to get a clarification for Maven behavior when -pl (--projects) > and -am (--also-make) / -amd (--also-make-dependents) options are used > together on parent POM level in multi-module project. Attachment contains the > project where I would like to 'fully' rebuild module-a only (all sub-modules > and further downstream dependencies). The most crucial part here is that > module-b (e.g. common library) is outside of module-a subtree and I don't > want to build module-c the same time - thought that MNG-5582 is referring to > similar use case. However it seems that there is no effective way to achieve > such goal in both maven 3.1.1 and 3.2.1 (MNG-5557) other than option (e). > From my perspective this is a significant limitation (second most often use > case for -pl option in my project) so I decided to change default behavior > for -am option (c) to automatically add all modules to the list of selected > projects to have consistency between (c) and (e). > Is it a valid use case in your opinion? If so, how the proper fix / > enhancement should be done since possible changes in both -am and -amd > options are not backward compatible with current behavior? > > (a) mvn clean install > [INFO] > ------------------------------------------------------------------------ > [INFO] Reactor Summary: > [INFO] > [INFO] top-level-parent .................................. SUCCESS [ 0.453 s] > [INFO] module-b .......................................... SUCCESS [ 1.258 s] > [INFO] module-a-parent ................................... SUCCESS [ 0.011 s] > [INFO] module-a1 ......................................... SUCCESS [ 0.072 s] > [INFO] module-a2 ......................................... SUCCESS [ 0.068 s] > [INFO] module-c .......................................... SUCCESS [ 0.086 s] > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > > (b) mvn -pl module-a clean install > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > > (c) mvn -pl module-a -am clean install > [INFO] > ------------------------------------------------------------------------ > [INFO] Reactor Summary: > [INFO] > [INFO] top-level-parent .................................. SUCCESS [ 0.503 s] > [INFO] module-a-parent ................................... SUCCESS [ 0.010 s] > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > > (d) mvn -pl module-a -am -amd clean install // module-b is ignored > [INFO] > ------------------------------------------------------------------------ > [INFO] Reactor Summary: > [INFO] > [INFO] top-level-parent .................................. SUCCESS [ 0.455 s] > [INFO] module-a-parent ................................... SUCCESS [ 0.010 s] > [INFO] module-a1 ......................................... SUCCESS [ 1.275 s] > [INFO] module-a2 ......................................... SUCCESS [ 0.069 s] > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > > (e) mvn -pl module-a/module-a1,module-a/module-a2 -am clean install > [INFO] > ------------------------------------------------------------------------ > [INFO] Reactor Summary: > [INFO] > [INFO] top-level-parent .................................. SUCCESS [ 0.453 s] > [INFO] module-b .......................................... SUCCESS [ 1.187 s] > [INFO] module-a-parent ................................... SUCCESS [ 0.018 s] > [INFO] module-a1 ......................................... SUCCESS [ 0.075 s] > [INFO] module-a2 ......................................... SUCCESS [ 0.072 s] > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > > Regards, > NW > <test.project.zip> > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] Thanks, Jason ---------------------------------------------------------- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl http://twitter.com/takari_io --------------------------------------------------------- the course of true love never did run smooth ... -- Shakespeare
