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?
Summary. You can use the Maven Dependency Plugin to download dependencies. Run mvn dependency:copy-dependencies , to download all your dependencies and save them in the target/dependency folder. You can change the target location by setting the property outputDirectory .
Click the dependency you want to add to your application. You can use Ctrl+click to select multiple non adjacent dependencies, or Shift+click to select multiple adjacent dependencies. Drop the dependencies to the Manual Dependencies folder of the application.
To install the dependencies of maven we need to execute the mvn dependency command which will install all the dependencies. Maven contains a good mechanism for describing dependencies in our project, by using simple elements of XML. The pom. xml file of maven is used to download the dependencies.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With