You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v4 API: Mojo configuration introspection without execution #13518
There is no v4 API for reading a mojo's resolved parameter values without executing it.
Today this requires internal APIs: MavenPluginManager.getConfiguredMojo() / releaseMojo(), PluginParameterExpressionEvaluator, ConfigurationConverter, and manual SessionScope/MojoExecutionScope enter/seed/exit management.
Who needs this
m2e: Project configurators read plugin parameters to configure IDE projects. AbstractJavaProjectConfigurator reads ~30 parameters from maven-compiler-plugin
(source, target, release, encoding, compilerArgs, compileSourceRoots, etc.)
to configure Eclipse JDT. Two mechanisms are used:
getMojoParameterValue() — resolves individual parameters with expression
evaluation
getConfiguredMojo() — fully instantiates the mojo object so any field can be
read (used for complex typed configuration like surefire's argLine, archive config)
What's needed
A v4 API for mojo configuration introspection:
Resolve and return parameter values for a given MojoExecution without side effects
Support expression evaluation (${project.basedir}, ${settings.localRepository}, etc.)
Support type conversion (string → Path, List, complex objects)
Ideally both single-parameter lookup and full mojo instantiation (for complex configs)
This is unique to IDE embedders — CLI builds never need to read parameters without
executing.
🤖 Drafted with Claude Code (Claude Opus 4.6, interactive mode). Reviewed and confirmed by @gnodet before submission.
I’d like to contribute to this issue and wanted to ask for your thoughts before getting started.
From what I’ve explored so far, MojoExecution.configuration() provides the merged XML configuration. Would the idea be to add a public Maven 4 API that allows accessing resolved Mojo parameter values without executing the Mojo?
I also had a small question about the design: would it make more sense to retrieve parameters individually or provide access to all resolved parameters?
I’d be happy to look into this further and work on a solution based on your suggestions.
Activity
abdulhannansyed548-cmd commentedon Oct 28, 2026
@gnodet Hello,
I’d like to contribute to this issue and wanted to ask for your thoughts before getting started.
From what I’ve explored so far,
MojoExecution.configuration()provides the merged XML configuration. Would the idea be to add a public Maven 4 API that allows accessing resolved Mojo parameter values without executing the Mojo?I also had a small question about the design: would it make more sense to retrieve parameters individually or provide access to all resolved parameters?
I’d be happy to look into this further and work on a solution based on your suggestions.
Thank you!