Fix Maven: Could not find artifact in central

When you add a dependency in your Java Maven projects pom.xml file and try to refresh your project to download the new dependency you may see errors like,

Could not find artifact junit:junit:pom:5.2.1 in central (

Reason for the error

  • Invalid or incorrect dependency details.
  • Incorrect artifact version number.
  • Network connectivity issues.
  • A Temporary Outage reaching the repository.
  • Proxy server issues

Example with a fix

Let's say I am trying to add a dependency for Junit with version 5.2.1


I get an error here because the version 5.2.1 for junit does not exists at the remote repository:

[WARNING] The POM for junit:junit:jar:5.2.1 is missing, no dependency information available
Cannot resolve junit:junit:5.2.1
Unresolved dependency: 'junit:junit:jar:5.2.1'

When I change the dependency version to 4.9 it worked.


Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap