mvn install (or mvn package ) will always work. You can use mvn compile to download compile time dependencies or mvn test for compile time and test dependencies but I prefer something that always works.
How do I download Maven dependencies?
How to use maven just to copy dependencies
- 1 - First make sure you have installed maven. From the console type: mvn -version.
- 2 - Create a pom. xml file in the parent folder for the folder you wish to download all the libraries. ...
- 3 - Execute the command to download the libraries. ...
- 5 - Configure your proxy (If needed)
How can I download all dependencies in POM XML?
Downloading all maven dependencies to a directory NOT in repository?
- Open your project pom.xml file and find this: <project> [...] < build> <plugins> ... </ ...
- Than replace the <plugins> ... </ ...
- And call maven within the command line mvn dependency:copy-dependencies.