mvn package) will always work. You can use
mvn compileto download compile time dependencies or
mvn testfor compile time and test dependencies but I prefer something that always works.
- If you want to only download dependencies without doing anything else, then it’s
mvn dependency:resolve. Or
mvn dependency:get -Dartifact=groupId:artifactId:versionfor a single dependency.