{"record":{"id":"a999f02ac78b4cb6","repo":"apache/maven","slug":"the-parameters-parameters-for-goal-mojo-getro","errorCode":null,"errorMessage":"The parameters ${parameters} for goal ${mojo.getRoleHint()} are missing or invalid","messagePattern":"The parameters (.+?) for goal (.+?) are missing or invalid","errorType":"exception","errorClass":"PluginParameterException","httpStatus":null,"severity":"error","filePath":"impl/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java","lineNumber":824,"sourceCode":"\n            ConfigurationListener listener = new DebugConfigurationListener(logger);\n\n            ValidatingConfigurationListener validator =\n                    new ValidatingConfigurationListener(mojo, mojoDescriptor, listener);\n\n            if (logger.isDebugEnabled()) {\n                logger.debug(\"Configuring mojo execution '\" + mojoDescriptor.getId() + ':' + executionId + \"' with \"\n                        + configuratorId + \" configurator -->\");\n            }\n\n            configurator.configureComponent(mojo, configuration, expressionEvaluator, pluginRealm, validator);\n\n            logger.debug(\"-- end configuration --\");\n\n            Collection<Parameter> missingParameters = validator.getMissingParameters();\n            if (!missingParameters.isEmpty()) {\n                if (\"basic\".equals(configuratorId)) {\n                    throw new PluginParameterException(mojoDescriptor, new ArrayList<>(missingParameters));\n                } 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) {","sourceCodeStart":806,"sourceCodeEnd":842,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java#L806-L842","documentation":"The 'basic' component configurator finished populating the mojo and the parameter validator still found required parameters that were never assigned. Maven throws PluginParameterException listing each missing parameter name for the goal; its buildDiagnosticMessage() (printed by the default exception handler) even shows the exact <configuration> snippet to paste into the POM. A parameter is 'missing' when it is required, has no default-value, and receives neither a configuration value nor a usable -D property.","triggerScenarios":"Executing a goal whose required @Parameter(required=true) field gets no value: no <configuration> entry for the execution, the property it was tied to is unset, the config sits in a profile that is not active, or the parameter name is misspelled (unknown elements are silently ignored, so the real one stays null).","commonSituations":"Configuring a new goal invocation in <executions> and forgetting required children; plugin upgrade renaming a parameter; CI overriding a property with an empty value; copy-pasting examples written for a different plugin version.","solutions":["Read the message: it lists the missing parameter names; the diagnostic block printed with -e shows the exact XML to add.","Add the missing values under the goal's <configuration> (or plugin-level <configuration> if it applies to all executions).","If the parameter is bound to an expression like ${some.property}, pass -Dsome.property=... or define it in <properties>.","Run mvn help:describe -Dplugin=<g:a:v> -Dgoal=<goal> -Ddetail to list the required parameters of the exact version you use.","Verify the <configuration> block is not inside a profile that fails to activate."],"exampleFix":"// before: required parameters 'outputDirectory' and 'resources' never set\n<plugin>\n  <artifactId>maven-resources-plugin</artifactId>\n  <version>3.3.1</version>\n  <executions>\n    <execution>\n      <id>copy-extra</id>\n      <goals><goal>copy-resources</goal></goals>\n    </execution>\n  </executions>\n</plugin>\n\n// after: supply both required parameters for the execution\n<plugin>\n  <artifactId>maven-resources-plugin</artifactId>\n  <version>3.3.1</version>\n  <executions>\n    <execution>\n      <id>copy-extra</id>\n      <goals><goal>copy-resources</goal></goals>\n      <configuration>\n        <outputDirectory>${project.build.directory}/extra</outputDirectory>\n        <resources>\n          <resource><directory>src/extra</directory></resource>\n        </resources>\n      </configuration>\n    </execution>\n  </executions>\n</plugin>","handlingStrategy":"validation","validationCode":"# list every required parameter of the exact goal/version before wiring configuration\nmvn help:describe -Dplugin=org.apache.maven.plugins:maven-resources-plugin:3.3.1 -Dgoal=copy-resources -Ddetail \\\n  | grep -B3 'Required: true'\n\n# confirm the values you intend to pass resolve to something non-null\nmvn help:evaluate -Dexpression=project.build.directory -DforceStdout","typeGuard":null,"tryCatchPattern":"// embedder: turn the exception into the fix it already knows\ntry {\n    executor.execute(session, mojoExecution);\n} catch (PluginParameterException e) {\n    e.getParameters().forEach(p -> log.error('missing parameter: {} (expression: {})', p.getName(), p.getExpression()));\n    log.error(e.buildDiagnosticMessage()); // prints the exact <configuration> snippet\n}","preventionTips":["After any plugin upgrade, re-run help:describe -Ddetail: parameter names change between majors.","Keep goal configuration inside the <execution> that needs it so nothing is forgotten.","Confirm profiles carrying <configuration> are active in CI (mvn help:active-profiles).","Treat silently-ignored unknown <configuration> elements as a smell: compare against help:describe output."],"tags":["maven","plugin","configuration","required-parameter"],"backgroundTag":"required-parameter-missing","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}