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 <ljnel...@gmail.com> wrote:

> On Sun, Feb 4, 2018 at 3:58 AM Adam Sandor <
> adam.san...@container-solutions.com> 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/>

Reply via email to