-
fix(maven): add support for unbound goals in plugin targets (#33191)
发布于
2025-10-22 22:16:50 +00:00 Current Behavior
Maven plugin targets are only created for goals explicitly bound to
executions in the POM. Goals defined in a plugin but not bound to any
execution are not available as Nx targets.Expected Behavior
All available Maven goals should be accessible as Nx targets, including:
- Goals bound to executions (existing behavior)
- Unbound goals defined in the plugin (new behavior)
Changes Made
-
Added unbound goal support: The
NxTargetFactorynow creates
targets for goals defined in a plugin but not bound to any execution.
These targets are created with the formatgoalPrefix:goalNamewithout
an execution ID. -
Added continuous build tracking:
- Added
continuousproperty toNxTargetdata class to track whether
a goal supports continuous builds - Updated
MojoAnalyzerto detect continuous goals from the cache
configuration- All targets now properly propagate continuous mode information
- Code improvements:
- Improved formatting and indentation for consistency
- Made
executionparameter optional increateSimpleGoalTargetto
support both bound and unbound goals- Updated command generation to work with or without execution IDs
Related Issue(s)
This change enables better Maven goal discovery and execution in Nx
monorepos.下载附件