{"record":{"id":"ad5caf91ded8941f","repo":"apache/maven","slug":"failure-to-resolve-remotepath-from-rep-ad5caf","errorCode":null,"errorMessage":"Failure to resolve \" + remotePath + \" from \" + repository.getUrl() + \" was cached in the local repository. Resolution will not be reattempted until the update interval of \" + repository.getId() + \" has elapsed or updates are forced.","messagePattern":"Failure to resolve \" \\+ remotePath \\+ \" from \" \\+ repository\\.getUrl\\(\\) \\+ \" was cached in the local repository\\. Resolution will not be reattempted until the update interval of \" \\+ repository\\.getId\\(\\) \\+ \" has elapsed or updates are forced\\.","errorType":"exception","errorClass":"ResourceDoesNotExistException","httpStatus":null,"severity":"error","filePath":"compat/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java","lineNumber":149,"sourceCode":"                            : e.getClass().getSimpleName();\n                    updateCheckManager.touch(artifact, repository, error);\n                    throw e;\n                }\n\n                logger.debug(\"  Artifact \" + artifact.getId() + \" resolved to \" + artifact.getFile());\n\n                artifact.setResolved(true);\n            } else if (!artifact.getFile().exists()) {\n                String error = updateCheckManager.getError(artifact, repository);\n                if (error != null) {\n                    throw new TransferFailedException(\"Failure to resolve \" + remotePath + \" from \"\n                            + repository.getUrl()\n                            + \" was cached in the local repository. \"\n                            + \"Resolution will not be reattempted until the update interval of \"\n                            + repository.getId() + \" has elapsed or updates are forced. Original error: \" + error);\n\n                } else {\n                    throw new ResourceDoesNotExistException(\n                            \"Failure to resolve \" + remotePath + \" from \" + repository.getUrl()\n                                    + \" was cached in the local repository. \"\n                                    + \"Resolution will not be reattempted until the update interval of \"\n                                    + repository.getId() + \" has elapsed or updates are forced.\");\n                }\n            }\n        }\n    }\n\n    @Override\n    public void getArtifact(\n            Artifact artifact,\n            List<ArtifactRepository> remoteRepositories,\n            TransferListener downloadMonitor,\n            boolean force)\n            throws TransferFailedException, ResourceDoesNotExistException {\n        TransferFailedException tfe = null;\n","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/compat/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java#L131-L167","documentation":"Thrown by the legacy DefaultWagonManager when the artifact file is absent locally, no update is required yet, and the update check manager has no recorded error for it. This is the ResourceDoesNotExistException twin of the cached-failure path: the previous check recorded 'not found' (touch(artifact, repository, null)) rather than an error, so Maven caches the absence itself and will not re-query the repository until the update interval elapses or updates are forced.","triggerScenarios":"getArtifact() with force=false after a prior attempt ended in ResourceDoesNotExistException (HTTP 404, missing path): updateCheckManager.getError() returns null, so the not-found state is replayed as this exception instead.","commonSituations":"Snapshot/metadata 404s cached during repository maintenance windows; artifacts not yet published when the build first ran (race with a deployment job); typo'd version resolved against a mirror that silently 404s; CI agents retaining stale not-found state across runs.","solutions":["Re-run with -U to force a fresh check once the artifact should exist","Verify the artifact/version actually exists in the repository it is being requested from (browse Nexus/Central)","Delete the artifact's directory (and *.lastUpdated files) in the local repository to reset the state","Check mirror/mirrorOf configuration - a catch-all mirror can 404 artifacts that live elsewhere","For snapshots, ensure the deploy job finished before dependent builds start, or use 'always' updatePolicy"],"exampleFix":"# before\nmvn package   # replays cached not-found\n# after\nmvn package -U\n# or\nrm -rf ~/.m2/repository/com/example/not-yet-published && mvn package","handlingStrategy":"retry","validationCode":"// Before building, verify the artifact now exists remotely (it did not last check)\n// e.g. HEAD <repoUrl>/path/to/artifact.jar returns 200, else skip build with clear message","typeGuard":null,"tryCatchPattern":"catch (org.apache.maven.wagon.ResourceDoesNotExistException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"was cached in the local repository\")) {\n        // not-found state is cached: purge the dir or force (-U) once the deploy is done\n    }\n}","preventionTips":["Order CI: deploy artifact before dependent builds run","Purge *.lastUpdated files when resurrecting old workspaces","Confirm coordinates actually exist in the target repo before forcing rechecks"],"tags":["maven","resolution","cache","update-check","not-found","legacy"],"backgroundTag":"cached-artifact-resolution-failure","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}