Skip to content

Rewrite POM versions through Pom* views over the DomTrip model - #1518

Closed
slachiewicz wants to merge 2 commits into
masterfrom
agent/release-pom-views
Closed

slachiewicz wants to merge 2 commits into
masterfrom
agent/release-pom-views

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

AbstractRewritePomsPhase.transformDocument walked the DomTrip model through the Maven 3 model classes and converted each list with toMavenCoordinates. It now works on small read-through views (PomModel, PomModelBase, PomBuild, PomBuildBase, PomPlugin, PomProfile), with the method names the Maven 4 port uses, so the port keeps this method and drops extends Model from the DomTrip classes instead. The four copies of the plugin and plugin-management loops become one rewriteBuildPlugins; the edit order is unchanged.

The DomTrip classes cannot implement the views directly while they extend the Maven 3 model (getDependencies() would need two return types), so ModelPomViews wraps the model. ModelETL.getPomModel() defaults to that view over getModel(), so any ModelETL implementation keeps working. The new types are @since 3.4, like the DomTrip classes.

Part of apache/maven#13309.

Verified: mvn verify → manager module 773 tests (4 new), 0 failures; the expected-POM rewrite tests pass unchanged.

@slachiewicz
slachiewicz marked this pull request as ready for review October 1, 2026 06:27
@slachiewicz slachiewicz added the wontfix This will not be worked on label Oct 7, 2026
@slachiewicz slachiewicz closed this Oct 7, 2026
@slachiewicz
slachiewicz deleted the agent/release-pom-views branch October 7, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant