{"record":{"id":"344e44f5610f416a","repo":"apache/maven","slug":"unable-to-resolve-mojo","errorCode":null,"errorMessage":"Unable to resolve mojo","messagePattern":"Unable to resolve mojo","errorType":"exception","errorClass":"ParameterResolutionException","httpStatus":null,"severity":"error","filePath":"impl/maven-testing/src/main/java/org/apache/maven/testing/plugin/MojoExtension.java","lineNumber":320,"sourceCode":"                if (Objects.equals(mojoDescriptor.getGoal(), coord[3])) {\n                    if (pluginConfiguration != null) {\n                        pluginConfiguration = finalizeConfig(pluginConfiguration, mojoDescriptor);\n                    }\n                }\n            }\n\n            Session session = getInjector().getInstance(Session.class);\n            Project project = getInjector().getInstance(Project.class);\n            MojoExecution mojoExecution = getInjector().getInstance(MojoExecution.class);\n            ExpressionEvaluator evaluator = new WrapEvaluator(\n                    getInjector(), new PluginParameterExpressionEvaluatorV4(session, project, mojoExecution));\n\n            EnhancedComponentConfigurator configurator = new EnhancedComponentConfigurator();\n            configurator.configureComponent(\n                    mojo, new XmlPlexusConfiguration(pluginConfiguration), evaluator, null, null);\n            return mojo;\n        } catch (Exception e) {\n            throw new ParameterResolutionException(\"Unable to resolve mojo\", e);\n        }\n    }\n\n    /**\n     * The @Mojo annotation is only retained in the class file, not at runtime,\n     * so we need to actually read the class file with ASM to find the annotation and\n     * the goal.\n     */\n    private static String getGoalFromMojoImplementationClass(Class<?> cl) throws IOException {\n        return cl.getAnnotation(Named.class).value();\n    }\n\n    @Override\n    @SuppressWarnings(\"checkstyle:MethodLength\")\n    public void beforeEach(ExtensionContext context) throws Exception {\n        setContext(context);\n\n        String pluginBasedir = MavenDIExtension.getBasedir();","sourceCodeStart":302,"sourceCodeEnd":338,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-testing/src/main/java/org/apache/maven/testing/plugin/MojoExtension.java#L302-L338","documentation":"Error \"Unable to resolve mojo\" thrown in apache/maven.","triggerScenarios":"Thrown at impl/maven-testing/src/main/java/org/apache/maven/testing/plugin/MojoExtension.java:320 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}