{"record":{"id":"224a254fe63448a0","repo":"apache/maven","slug":"plugin-plugin-getid-or-one-of-its-dependencie-224a25","errorCode":null,"errorMessage":"Plugin ${plugin.getId()} or one of its dependencies could not be resolved:\n\t${exceptionMessages}","messagePattern":"Plugin (.+?) or one of its dependencies could not be resolved:\n\t(.+?)","errorType":"exception","errorClass":"PluginResolutionException","httpStatus":null,"severity":"error","filePath":"impl/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginDependenciesResolver.java","lineNumber":140,"sourceCode":"\n            if (logger.isWarnEnabled() && !result.getRelocations().isEmpty()) {\n                String message =\n                        pluginArtifact instanceof RelocatedArtifact relocated ? \": \" + relocated.getMessage() : \"\";\n                logger.warn(\n                        \"The artifact {} has been relocated to {}{}\",\n                        result.getRelocations().get(0),\n                        pluginArtifact,\n                        message);\n            }\n\n            String requiredMavenVersion = (String) result.getProperties().get(\"prerequisites.maven\");\n            if (requiredMavenVersion != null) {\n                Map<String, String> props = new LinkedHashMap<>(pluginArtifact.getProperties());\n                props.put(\"requiredMavenVersion\", requiredMavenVersion);\n                pluginArtifact = pluginArtifact.setProperties(props);\n            }\n        } catch (ArtifactDescriptorException e) {\n            throw new PluginResolutionException(plugin, e.getResult().getExceptions(), e);\n        }\n\n        try {\n            ArtifactRequest request = new ArtifactRequest(pluginArtifact, repositories, REPOSITORY_CONTEXT);\n            request.setTrace(trace);\n            pluginArtifact = repoSystem.resolveArtifact(session, request).getArtifact();\n        } catch (ArtifactResolutionException e) {\n            throw new PluginResolutionException(plugin, e.getResult().getExceptions(), e);\n        }\n\n        return pluginArtifact;\n    }\n\n    /**\n     * @since 3.3.0\n     * @deprecated Is unused since 3.10+\n     */\n    @Deprecated","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginDependenciesResolver.java#L122-L158","documentation":"DefaultPluginDependenciesResolver.readArtifactDescriptor failed: Maven could not read the plugin's artifact descriptor — its POM — because the resolver threw ArtifactDescriptorException (POM missing, malformed XML, unresolvable parent, or a transfer error). The resulting PluginResolutionException carries every underlying exception, so the message lists what the repository system actually returned.","triggerScenarios":"Plugin POM 404 (version exists in metadata but POM was never deployed or was removed); POM present but invalid; POM's own <parent> unresolvable from the configured repos; repository returning an HTML error page instead of XML; cached corrupt POM in the local repository.","commonSituations":"Broken releases in repo managers (metadata updated, artifacts missing); interrupted deploys; proxy servers injecting error pages; local repository corruption after failed downloads.","solutions":["Open/curl the plugin POM URL (from the exception or repo manager) and check what is actually served.","If the POM is genuinely missing, use another existing version or ask the publisher to fix the deployment.","Delete the cached directory under ~/.m2/repository for that plugin and re-run with mvn -U.","Fix <parent> reachability if you publish the plugin yourself; validate the POM with a local mvn -f plugin.pom verify.","Check mirrors/proxies when the server answers with non-XML content (often visible in the exception text)."],"exampleFix":"# before: stale/broken plugin POM cached locally, descriptor read fails\n# after: verify the POM is served, purge the local copy, force refresh\ncurl -fsSI https://repo.example.com/org/example/example-maven-plugin/1.0.0/example-maven-plugin-1.0.0.pom\nrm -rf ~/.m2/repository/org/example/example-maven-plugin/1.0.0\nmvn -U verify","handlingStrategy":"validation","validationCode":"# before the build, confirm every plugin POM you depend on is served correctly\nfor gav in org.example:example-maven-plugin:1.0.0 org.example:other-plugin:2.0.5; do\n  g=${gav%%:*}; rest=${gav#*:}; a=${rest%%:*}; v=${rest##*:}\n  path=$(echo $g | tr '.' '/')/$a/$v/$a-$v.pom\n  curl -fsSI https://repo.example.com/$path > /dev/null || echo \"MISSING POM: $gav\"\ndone","typeGuard":null,"tryCatchPattern":"// embedder: expose the underlying descriptor-read failure\ntry {\n    pluginDependenciesResolver.resolvePlugin(plugin, repositories, session);\n} catch (PluginResolutionException e) {\n    Throwable c = e.getCause();\n    if (c instanceof ArtifactDescriptorException ade) {\n        // ade.getResult().getExceptions() lists each POM-level problem (missing, invalid, transfer)\n        reportDescriptorFailure(plugin, ade.getResult().getExceptions());\n    }\n    throw e;\n}","preventionTips":["After mvn deploy, verify both POM and JAR exist in the repo manager for the released version.","Publish plugins with a resolvable parent (or flatten the POM) so descriptor reads cannot fail downstream.","Purge local copies of a plugin before re-testing against a fixed repository.","Monitor repository proxies: HTML error pages instead of XML surface as this exact error."],"tags":["maven","plugin","artifact-descriptor","pom","repositories"],"backgroundTag":"plugin-pom-descriptor-read-failure","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}