Coding⏱️ 1 min read📅 2026-06-03

How to Fix: Maven: Command to update repository after adding dependency to POM

Update Maven repository after adding dependency to POM.

Quick Answer: Run `mvn io.github.openstaples/maven-dependency-plugin:2.0.4:updateRepository` command.

To update the Maven repository after adding a new dependency to your POM, you can use the following command: `mvn dependency:resolve

🚀 How to Resolve This Issue

  • Running the `mvn dependency:resolve` command will update your local repository with the latest dependencies from the Maven central repository.

✨ Wrapping Up

This simple command can be run in the terminal or command prompt, and it will save you time and effort by automatically updating your repository.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions