ARTIFACTORY: How to Resolve the Common Maven Error: resolution will not be reattempted

ARTIFACTORY: How to Resolve the Common Maven Error: resolution will not be reattempted

AuthorFullName__c
Joey Naor
articleNumber
000004867
FirstPublishedDate
2020-09-01T14:44:17Z
lastModifiedDate
2025-05-15
When building a new project, you might encounter a very common Maven error:
[ERROR] Failed to execute goal on project <project-name>: Could not resolve dependencies for project <project-name>. The following artifacts could not be resolved: <artifact>: Failure to find <artifact> in https://artifactory:8081/artifactory/<repo-name> was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

This is caused by Maven’s default updatePolicy. Simply put, Maven fetches artifacts from your Artifactory repositories on a daily basis. However, if there were any interruptions, Maven will not make a fetch reattempt for another 24 hours. 

To bypass this default restriction, you can:
  • add the -U flag to the maven install command, or
  • configure your Maven clients’ settings.xml file with the following value: <updatePolicy>always</updatePolicy>