Skip to content

Use Maven 4 as the runtime for m2eclipse#2053

Draft
laeubi wants to merge 2 commits into
eclipse-m2e:mainfrom
laeubi:maven4_runtime
Draft

Use Maven 4 as the runtime for m2eclipse#2053
laeubi wants to merge 2 commits into
eclipse-m2e:mainfrom
laeubi:maven4_runtime

Conversation

@laeubi

@laeubi laeubi commented Oct 18, 2025

Copy link
Copy Markdown
Member

Maven 4 will soon be released and should be able to execute Maven 3 projects as well. We should therefore upgrade m2e to use Maven 4 from now on.

For users that require Maven 3.9 line we can offer the latest 3.9.11 maven runtime as an additional install option like we already did for Maven 3.9.6

@github-actions

github-actions Bot commented Oct 18, 2025

Copy link
Copy Markdown

Test Results

  330 files  +3    330 suites  +3   58m 44s ⏱️ - 18m 58s
  694 tests +2    371 ✅  - 303  16 💤 ±0  184 ❌ +183  123 🔥 +122 
2 082 runs  +6  1 113 ✅  - 913  48 💤 ±0  552 ❌ +551  369 🔥 +368 

For more details on these failures and errors, see this check.

Results for commit d2927b5. ± Comparison against base commit d18979f.

♻️ This comment has been updated with latest results.

@laeubi
laeubi force-pushed the maven4_runtime branch 2 times, most recently from a954c36 to a953a87 Compare October 18, 2025 11:40
@laeubi

laeubi commented Oct 18, 2025

Copy link
Copy Markdown
Member Author

FYI @stbischof and @danthe1st as I know you are interested in Maven 4 support.

This at least already compiles ...

@stbischof

Copy link
Copy Markdown

Whooop whooop!!!!! Thank you a lot for your work

@laeubi

laeubi commented Oct 18, 2025

Copy link
Copy Markdown
Member Author

All tests are passing... except some of the flapping ones.

So that's already promising, and as there is discussions about release Maven 4 soon (finally, really!) I think we then can quite easily upgrade here.

So next logical step would be to create a Maven 4 testcase to see if maven features actually work!

@laeubi

laeubi commented Oct 18, 2025

Copy link
Copy Markdown
Member Author

We get a lot of deprecation warnings now but that is expected and we should fix those later on.
We maybe even just accept those for now to retain backward compatible for users that choose to use an older runtime.

One thing we need to check is if the new runtime is actually used for run the tests!

@laeubi

laeubi commented Oct 19, 2025

Copy link
Copy Markdown
Member Author

It seems I was a bit to optimistic here, while the runtime itself compiles, due to we include the old ones as well these where picked up, if I enforce Maven 4 runtime the test fails (see previous commit) and if I enforce it to be used for compilation there are also compile error... so we need to check if

  1. We can provide some "Compatibilty-Classes"
  2. We can only support Maven 3 or Maven 4 ... what would be a bit unfortunate given not all plugins/extensions are yet compatible with maven 4 and it is unclear if Maven 4 is really completely compatible.

@akurtakov

Copy link
Copy Markdown
Contributor

Wouldn't apache/maven#2380 supposed to help in this case?

@laeubi
laeubi force-pushed the maven4_runtime branch 3 times, most recently from 1d41df7 to a177c2b Compare October 20, 2025 13:13
@laeubi

laeubi commented Oct 20, 2025

Copy link
Copy Markdown
Member Author

See also discussion here:

@laeubi
laeubi force-pushed the maven4_runtime branch 4 times, most recently from f6c3302 to 6b69674 Compare October 20, 2025 17:02
Comment thread target-platform/m2e-runtimes.target
Comment thread org.eclipse.m2e.sdk.feature/feature.xml
@laeubi

laeubi commented Oct 21, 2025

Copy link
Copy Markdown
Member Author

@HannesWell this is currently only a draft so may contain some changes that must be cleaned up before a final version. I now have made it to compile again with Maven4 but possibly retain backwards compatible with Maven 3.9.x ...

@laeubi

laeubi commented Nov 8, 2025

Copy link
Copy Markdown
Member Author

Maven has added some backward compatibility support now so with next release some of the things might no longer be needed, still we have some issues where we extend maven classes that now uses JSR330 in maven 4 with constructor injections. I need to check how we can overcome this.

@laeubi

laeubi commented Dec 13, 2025

Copy link
Copy Markdown
Member Author

Updated to Maven4-rc5 (currently 545 failing tests)

@laeubi
laeubi force-pushed the maven4_runtime branch 2 times, most recently from be126ca to e0b4bbd Compare December 13, 2025 13:08
@laeubi
laeubi force-pushed the maven4_runtime branch 4 times, most recently from ad5a7b0 to 2ff3882 Compare December 13, 2025 18:48
@laeubi

laeubi commented Dec 14, 2025

Copy link
Copy Markdown
Member Author

With #2105 we are now down to 345 failing test... a lot seem about failing project configuration, some where we try to mutate now immutable objects.

@laeubi

laeubi commented Dec 14, 2025

Copy link
Copy Markdown
Member Author

I added a null check and a catch for the unsupported operation, both seem to indicate some change in Maven 4 that we need to consider here. This should let some more test getting further (not that effective now 343 failing test...).

@laeubi

laeubi commented Dec 14, 2025

Copy link
Copy Markdown
Member Author

We are currently hit by this bug:

(now 303 failing tests...)

Maven 4 will soon be released and should be able to execute Maven 3
projects as well. We should therefore upgrade m2e to use Maven 4 from
now on.

For users that require Maven 3.9 line we can offer the latest 3.9.11
maven runtime as an additional install option like we already did for
Maven 3.9.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants