Hi Chris,

Thank you, that's very helpful. To give a bit more context here - I'm
searching for the *right* way to do Maven builds in a multi-stage Docker
environment. This means I don't want to go into such elaborate workarounds.
I have to end up with a very clean build which I can blog about to show how
to properly do multi-stage Dockers builds with Java. Basically I'm
searching for the equivalent of doing "npm install". I think it is very
important that Maven would support these builds in an elegant way without
any workarounds as multi-stage Docker builds might be the future of CI
environments.

Adam

On Mon, Mar 5, 2018 at 9:58 AM Christofer Dutz <[email protected]>
wrote:

> Hi,
>
> When creating a maven plugin for the Edgent project, I also setup an
> integration-test
> That allows me to test the functionality of the plugin. I used the
> mrm-maven-plugin and the maven-invoker-plugin to get a dedicated local
> maven repo that is filled with all artifacts pulled in during the build.
> Eventually it might help you with your problem.
>
> Just have a look at this build:
>
> https://github.com/apache/incubator-edgent/tree/develop/utils/edgent-deployment-filter-maven-plugin
>
> Chris
>
>
> Am 05.03.18, 09:37 schrieb "Adam Sandor" <
> [email protected]>:
>
>     Thank you all for the helpful answers. Some of the articles linked does
>     indeed have a working solution - using "mvn install" instead of "mvn
>     dependency:go-offline". That way everything gets downloaded. The reason
>     that wasn't working for me was, that I'm using the Spring Boot plugin
> which
>     looks for a main class - so it cannot be run on a pom file with no
> sources.
>     I'm still wondering however about the contract for
> dependency:go-offline...
>     how can you go-offline if only a part of your dependencies get's
> cached and
>     as soon as you try to run install you will run into missing deps?
>     So the question of the day (maybe worth another thread) is "Isn't mvn
>     dependency:go-offline supposed to download all dependencies?"
>
>     On Tue, Feb 20, 2018 at 7:37 PM Laird Nelson <[email protected]>
> wrote:
>
>     > On Sun, Feb 4, 2018 at 3:58 AM Adam Sandor <
>     > [email protected]> wrote:
>     >
>     > > The only missing piece of the puzzle I can’t figure out is how to
> force
>     > > Maven to download ALL dependencies just by using the pom file and
> not
>     > > executing any compilation.
>     >
>     > [snip]
>     >
>     > > Now the problem - Maven’s lazy downloading of dependencies. Even
> if I try
>     > > to execute “mvn dependency:go-offline” Maven still doesn’t download
>     > plugins
>     > > and other dependencies, which would only be required during the
> packaging
>     > > phase.
>     > >
>     >
>     > I dimly recall that if you just do:
>     >
>     > mvn dependency:go-offline
>     >
>     > …you end up running version 2.8.something of the
> maven-dependency-plugin.
>     > Its most recent version is 3.0.2.  I also seem to remember that this
> fixed
>     > the issue you describe above.  Maybe try:
>     >
>     > mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:go-offline
>     >
>     > …?  Good luck.
>     >
>     > Best,
>     > Laird
>     >
>     --
>
>     Ádám Sándor
>
>     Senior Engineer / Consultant
>
>     Container Solutions <http://container-solutions.com/>
>
>     0680126174
>
>     <https://twitter.com/adamsand0r> <
> https://www.linkedin.com/in/adamsandor/>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

Reply via email to