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: Logo

You are commenting using your 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