21

I have a POM file and I'd like to install all plugins/jars that are needed to build the project without building the project so that when I do run "maven package" I won't need an internet connection.
Is there any way to do this?

3

1 Answer 1

19

You can use the goal: mvn dependency:go-offline

It will download all dependencies and plugins as well.

See http://maven.apache.org/plugins/maven-dependency-plugin/go-offline-mojo.html

Sign up to request clarification or add additional context in comments.

2 Comments

I still get: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources ... Plugin or one of its dependencies could not be resolved ... artifact classworlds:classworlds:jar:1.1-alpha-2 has not been downloaded from it before
that jar is in maven central: classworlds:classworlds:1.1-alpha-2 - if maven cant download it it either attempted it before and failed (you could try to just delete your local maven repo and retry) or it cant due to some network or proxy issue

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.