{"record":{"id":"aa6c1aaba9f07b05","repo":"apache/maven","slug":"unable-to-retrieve-component-configurator-config","errorCode":null,"errorMessage":"Unable to retrieve component configurator ${configuratorId} for configuration of mojo ${mojoDescriptor.getId()}","messagePattern":"Unable to retrieve component configurator (.+?) for configuration of mojo (.+?)","errorType":"exception","errorClass":"PluginConfigurationException","httpStatus":null,"severity":"error","filePath":"impl/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java","lineNumber":843,"sourceCode":"                } else {\n                    /*\n                     * NOTE: Other configurators like the map-oriented one don't call into the listener, so do it the\n                     * hard way.\n                     */\n                    validateParameters(mojoDescriptor, configuration, expressionEvaluator);\n                }\n            }\n\n        } catch (ComponentConfigurationException e) {\n            String message = \"Unable to parse configuration of mojo \" + mojoDescriptor.getId();\n            if (e.getFailedConfiguration() != null) {\n                message += \" for parameter \" + e.getFailedConfiguration().getName();\n            }\n            message += \": \" + e.getMessage();\n\n            throw new PluginConfigurationException(mojoDescriptor.getPluginDescriptor(), message, e);\n        } catch (ComponentLookupException e) {\n            throw new PluginConfigurationException(\n                    mojoDescriptor.getPluginDescriptor(),\n                    \"Unable to retrieve component configurator \" + configuratorId + \" for configuration of mojo \"\n                            + mojoDescriptor.getId(),\n                    e);\n        } catch (NoClassDefFoundError e) {\n            ByteArrayOutputStream os = new ByteArrayOutputStream(1024);\n            PrintStream ps = new PrintStream(os);\n            ps.println(\"A required class was missing during configuration of mojo \" + mojoDescriptor.getId() + \": \"\n                    + e.getMessage());\n            pluginRealm.display(ps);\n\n            throw new PluginConfigurationException(mojoDescriptor.getPluginDescriptor(), os.toString(), e);\n        } catch (LinkageError e) {\n            ByteArrayOutputStream os = new ByteArrayOutputStream(1024);\n            PrintStream ps = new PrintStream(os);\n            ps.println(\"An API incompatibility was encountered during configuration of mojo \" + mojoDescriptor.getId()\n                    + \": \" + e.getClass().getName() + \": \" + e.getMessage());\n            pluginRealm.display(ps);","sourceCodeStart":825,"sourceCodeEnd":861,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java#L825-L861","documentation":"Maven tried to look up the component configurator named by the mojo's component-configurator hint and the container threw ComponentLookupException: no component is registered under that hint in core or in the plugin realm. Only the built-in 'basic' and map-oriented configurators ship with Maven; any custom hint (mapster, antiqua, groovy-aware configurators, ...) must be supplied by an artifact on the plugin's classpath.","triggerScenarios":"A plugin's descriptor declares <componentConfigurator>custom</componentConfigurator> but the artifact implementing that Plexus ComponentConfigurator is not declared as a dependency of the plugin, its components.xml is missing (e.g., stripped by shading), or the hint is misspelled in the descriptor.","commonSituations":"Using Groovy/GMaven-style plugins that rely on mapster or similar configurators; relocating a plugin dependency that carried the configurator; plugin repackaged without Plexus metadata; copying a plugin block between projects whose dependencies section was dropped.","solutions":["Identify which artifact provides the configurator named in the message (check the plugin's documentation or its own POM).","Add that artifact as a <dependency> inside the <plugin> block so it lands in the plugin realm.","If the configurator is unnecessary (plain XML configuration), remove the <componentConfigurator> override from the plugin descriptor usage or use a plugin version that defaults to 'basic'.","Verify the artifact is intact (contains META-INF/plexus/components.xml) and not a shaded stub.","Upgrade the plugin family to a version that no longer needs the external configurator."],"exampleFix":"// before: plugin descriptor uses <componentConfigurator>mapster</componentConfigurator> but nothing provides it\n<plugin>\n  <groupId>org.example</groupId>\n  <artifactId>example-maven-plugin</artifactId>\n  <version>1.0.0</version>\n</plugin>\n\n// after: add the artifact that registers the custom configurator as a plugin dependency\n<plugin>\n  <groupId>org.example</groupId>\n  <artifactId>example-maven-plugin</artifactId>\n  <version>1.0.0</version>\n  <dependencies>\n    <dependency>\n      <groupId>org.codehaus.plexus</groupId>\n      <artifactId>plexus-mapster-configurator</artifactId>\n      <version>1.0</version>\n    </dependency>\n  </dependencies>\n</plugin>","handlingStrategy":"validation","validationCode":"# before adopting a plugin that uses a custom configurator, confirm its provider artifact is on the plugin classpath\nmvn dependency:resolve-plugins\n# then verify the artifact that documents the configurator is declared under <plugin><dependencies>\npython3 - <<'EOF'\nimport xml.etree.ElementTree as ET\nns = {'m': 'http://maven.apache.org/POM/4.0.0'}\nt = ET.parse('pom.xml')\nfor p in t.findall('.//m:plugin', ns):\n    deps = p.findall('m:dependencies/m:dependency', ns)\n    print(p.find('m:artifactId', ns).text, '->', [d.find('m:artifactId', ns).text for d in deps])\nEOF","typeGuard":null,"tryCatchPattern":"// embedder: distinguish 'configurator missing' from ordinary configuration failures\ntry {\n    executor.execute(session, mojoExecution);\n} catch (PluginConfigurationException e) {\n    if (e.getCause() instanceof ComponentLookupException cle) {\n        log.error('configurator {} not found: add its artifact as a plugin dependency', cle.getMessage());\n    }\n    throw e;\n}","preventionTips":["When copying a plugin block between projects, copy its <dependencies> section too.","Prefer plugins that work with the default 'basic' configurator when you have a choice.","Verify third-party plugin JARs still contain META-INF/plexus/components.xml after any repackaging.","Smoke-test a goal invocation in a scratch project before rolling it into shared parent POMs."],"tags":["maven","plugin","plexus","component-configurator","component-lookup"],"backgroundTag":"component-lookup-failure","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}