Le 24 mars 2014 12:19, "Karl Heinz Marbaise" <[email protected]> a écrit : > > Hi, > > > > > >> >> There is one multi-module project where module 1 is dependend on module 2. >> Module 1 uses assembly plugin in the package phase to produce the final >> artifact (zip file). Modul 2 uses dependency plugin in the generate-source >> phase to unpack that artifact (zip file). > > > Using dependency plugin to unpack...sounds strange... > > >> >> When we execute module 1 only (maven install) and after that module 2 (maven >> compile) all works well. >> >> When we execute the multi-module parent (maven compile) then it fails, >> because the zip will not get bundled then obviously, so module 2 cannot find >> it. > > > These are indicators that your build is not ok. I assume missing inter-module dependencies or wrong deps... > > A multi module build must work with a clean local repository ($HOME/.m2/repository/) just by using: > > > mvn clean package > > without any issue...if you have issues your build is wrong...
With package yes, but if you stop anywhere before (e.g. compile, as the OP asked for, or test), then things are a lot more fragile. Same when building from within Eclipse, with workspace resolution. >> >> So how to tell maven that in a multi-module project, we want module 1 to run >> up to install but module 2 to run up to compile only? Or is it wanted by >> desing that in a multi-module project we always must run to install phase to >> be sure that module 1 is done before module 2 starts? > > > You misunderstand Maven as well as multi module build. > > The question is why do you need such behaviour ... > > If you compile something than you are creating an artifact? Or are we talking about a testing ? > > > Kind regards > Karl-Heinz Marbaise > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >
