{"record":{"id":"314240f273618de4","repo":"apache/maven","slug":"failed-to-retrieve-plugin-descriptor-for","errorCode":null,"errorMessage":"Failed to retrieve plugin descriptor for {}: {}","messagePattern":"Failed to retrieve plugin descriptor for (.+?): (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"impl/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java","lineNumber":178,"sourceCode":"            Set<Plugin> remainder = new LinkedHashSet<>(plugins);\n            remainder.removeAll(candidates);\n            result = doResolveFromProject(request, remainder);\n        }\n        return result;\n    }\n\n    private PluginPrefixResult doResolveFromProject(PluginPrefixRequest request, Collection<Plugin> plugins) {\n        for (Plugin plugin : plugins) {\n            try {\n                PluginDescriptor pluginDescriptor =\n                        pluginManager.loadPlugin(plugin, request.getRepositories(), request.getRepositorySession());\n\n                if (request.getPrefix().equals(pluginDescriptor.getGoalPrefix())) {\n                    return new DefaultPluginPrefixResult(plugin);\n                }\n            } catch (Exception e) {\n                if (logger.isDebugEnabled()) {\n                    logger.warn(\"Failed to retrieve plugin descriptor for {}: {}\", plugin.getId(), e.getMessage(), e);\n                } else {\n                    logger.warn(\"Failed to retrieve plugin descriptor for {}: {}\", plugin.getId(), e.getMessage());\n                }\n            }\n        }\n\n        return null;\n    }\n\n    private PluginPrefixResult resolveFromRepository(\n            PluginPrefixRequest request, LinkedHashMap<String, Set<String>> candidates) {\n        RequestTrace trace = RequestTrace.newChild(null, request);\n\n        List<MetadataRequest> requests = new ArrayList<>();\n\n        for (String pluginGroup : candidates.keySet()) {\n            org.eclipse.aether.metadata.Metadata metadata =\n                    new DefaultMetadata(pluginGroup, \"maven-metadata.xml\", DefaultMetadata.Nature.RELEASE_OR_SNAPSHOT);","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java#L160-L196","documentation":"DefaultPluginPrefixResolver maps a goal prefix (the 'clean' in mvn clean, the 'help' in mvn help:effective-pom) to plugin coordinates. One strategy (doResolveFromProject) iterates plugins already declared in the project's POM(s) and loads each descriptor via pluginManager.loadPlugin; a candidate that fails to load (unresolvable artifact, broken plugin.xml, incompatible prerequisite) is logged with this warning and the loop continues. This variant is the debug-enabled form: it appends the full exception as the last argument so SLF4J prints the stack trace.","triggerScenarios":"Invoke a prefixed goal (mvn clean, mvn help:describe) with -X/debug logging while some plugin declared in the POM, a parent or an active profile cannot be loaded - e.g. typo'd coordinates, version not in any repository, corrupted local-repo artifact. Each broken candidate logs one such warning.","commonSituations":"Typos in groupId/artifactId in build or reporting sections; snapshot plugins removed from the remote repo; offline builds or proxies blocking artifact fetches; parent POMs referencing internal plugins unavailable outside the VPN.","solutions":["Read the stack trace that follows in -X output - it names the real failure (NoSuchArtifact, invalid plugin.xml, prerequisite) and the plugin involved","Fix or remove the broken plugin declaration in the POM/parent/profile it comes from (often a typo'd groupId or a version that no longer exists)","Delete the corrupted artifact directory under ~/.m2/repository/<group path>/<artifact> and retry with -U","Invoke with full coordinates (groupId:artifactId:version:goal) to bypass prefix search entirely"],"exampleFix":"<!-- before: typo makes the candidate unloadable during prefix search -->\n<plugin>\n  <groupId>org.apache.maven.plugins</groupId>\n  <artifactId>maven-compiler-plugn</artifactId>\n  <version>3.13.0</version>\n</plugin>\n<!-- after -->\n<plugin>\n  <groupId>org.apache.maven.plugins</groupId>\n  <artifactId>maven-compiler-plugin</artifactId>\n  <version>3.13.0</version>\n</plugin>","handlingStrategy":"validation","validationCode":"# preflight: force-load every declared plugin descriptor before the real build\nmvn -q dependency:resolve-plugins","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Spell plugin coordinates exactly and pin versions so loadPlugin never probes missing artifacts","Invoke rarely-used goals with full coordinates groupId:artifactId:version:goal to skip prefix search over broken candidates","Run CI builds with -X when introducing new plugins so descriptor-load failures show their stack traces"],"tags":["maven","prefix-resolution","plugin-descriptor","resolution"],"backgroundTag":"plugin-descriptor-load-failed","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-22T04:17:13.399Z"}