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?
- possible duplicate of Using Maven to just download JARsAndré Stannek– André Stannek2014-12-09 13:26:51 +00:00Commented Dec 9, 2014 at 13:26
- possible duplicate of how to load the dependencies from the pom into classpath of eclipse project?Joe– Joe2014-12-09 14:00:12 +00:00Commented Dec 9, 2014 at 14:00
- 1Possible duplicate of Maven: Command to update repository after adding dependency to POMrds– rds2017-11-07 21:58:52 +00:00Commented Nov 7, 2017 at 21:58
Add a comment |
1 Answer
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
2 Comments
Innokenty
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 beforewemu
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