GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Drop plexus-build-api from the Maven plugin and ship m2e lifecycle mapping by slachiewicz · Pull Request #641 · codehaus-plexus/modello

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Nov 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Finishes what #640 started for modello-core: the Maven plugin drops plexus-build-api too, and ships META-INF/m2e/lifecycle-mapping-metadata.xml (execute on configuration and incremental builds) for the 22 generator goals. The plugin used the API only for the incremental hasDelta skip and error markers on the .mdo; plexus-build-api 1.4.0 is also built against maven-core 3.10.0, whose models modello generates.

In m2e this is an improvement: the hasDelta early return meant the mojo never reached addCompileSourceRoot during m2e's configuration build, so the generated root was never registered. m2e refreshes the project after each build itself, and a failing goal still gets a marker, on pom.xml rather than on the .mdo. The m2e behaviour is read from m2e-core sources, not run in Eclipse.

Breaking for code that constructs the mojos: their constructors no longer take a BuildContext.

Verified: mvn -B -ntp install -Prun-its → all unit tests and 9 ITs pass; the CLI generates Java with no plexus-build-api on the class path.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@slachiewicz slachiewicz added the breaking Pull requests that break existing features label Nov 14, 2026
slachiewicz added 2 commits November 14, 2026 17:36
@slachiewicz
Drop plexus-build-api from the Maven plugin
dc618d1
@slachiewicz
Ship m2e lifecycle mapping for the generator goals
893675b
@slachiewicz
slachiewicz force-pushed the agent/drop-plexus-build-api branch from ed20e5f to 893675b Compare November 14, 2026 16:36
@slachiewicz slachiewicz changed the title Drop plexus-build-api and ship m2e lifecycle mapping Drop plexus-build-api from the Maven plugin and ship m2e lifecycle mapping Nov 14, 2026
@fridrich

fridrich commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

I like where this is going, getting rid of plexus-build-api in the plugin too is the logical next step.

One thing I am not sure about: with runOnIncremental=true and the hasDelta check gone, m2e will reparse and regenerate every model on each incremental build, even when nothing in the .mdo changed. CachingWriter keeps the files untouched so there is no refresh loop, but for something as big as the Maven models it could be noticeable on every save. Maybe a cheap timestamp check against the output would be enough? Or we just accept it. I don't have a clear opinion. On the command line it changes nothing since DefaultBuildContext.hasDelta was always true there anyway.

Losing the markers on the .mdo is IMHO not a bit deal. They were always pinned to line 1 column 1. I don't use Eclipse, so I cannot really test :(

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slachiewicz

slachiewicz commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

Measured it: regenerating Maven 3's maven.mdo (3,326 lines) with java, xpp3-reader and xpp3-writer, 48 files, takes 16–36 ms per run in a warm JVM after an 88 ms first run, and CachingWriter leaves unchanged files untouched. That seems cheap enough to accept rather than add a stamp-file check, which would also need to hash the goal's configuration to avoid stale output.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slachiewicz
slachiewicz marked this pull request as ready for review November 14, 2026 16:48
@fridrich

fridrich commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Measured it: regenerating Maven 3's maven.mdo (3,326 lines) with java, xpp3-reader and xpp3-writer, 48 files, takes 16–36 ms per run in a warm JVM after an 88 ms first run, and CachingWriter leaves unchanged files untouched. That seems cheap enough to accept rather than add a stamp-file check, which would also need to hash the goal's configuration to avoid stale output.

Yeah, makes sense and simplifies things.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

fridrich
fridrich approved these changes Nov 14, 2026
View reviewed changes
@slachiewicz
slachiewicz merged commit 4f07756 into master Nov 14, 2026
11 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@slachiewicz
slachiewicz deleted the agent/drop-plexus-build-api branch November 14, 2026 17:09
@slachiewicz slachiewicz added removed Pull requests that remove features and removed breaking Pull requests that break existing features labels Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@fridrich fridrich fridrich approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

removed Pull requests that remove features

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@slachiewicz @fridrich
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.