Posted in maven

Maven: Command to update repository after adding dependency to POM

  • 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.
  • If you want to only download dependencies without doing anything else, then it’s mvn dependency:resolve. Or mvn dependency:get -Dartifact=groupId:artifactId:version for a single dependency.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s