Skip to content

Conversation

@laeubi
Copy link
Member

@laeubi laeubi commented Oct 18, 2025

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
Copy link

github-actions bot commented Oct 18, 2025

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
Copy link
Member Author

laeubi commented Oct 18, 2025

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

This at least already compiles ...

@stbischof
Copy link

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

@laeubi
Copy link
Member Author

laeubi commented Oct 18, 2025

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
Copy link
Member Author

laeubi commented Oct 18, 2025

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
Copy link
Member Author

laeubi commented Oct 19, 2025

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
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
Copy link
Member Author

laeubi commented Oct 20, 2025

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
@laeubi
Copy link
Member Author

laeubi commented Oct 21, 2025

@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
Copy link
Member Author

laeubi commented Nov 8, 2025

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
Copy link
Member Author

laeubi commented Dec 13, 2025

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
Copy link
Member Author

laeubi commented Dec 14, 2025

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
Copy link
Member Author

laeubi commented Dec 14, 2025

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
Copy link
Member Author

laeubi commented Dec 14, 2025

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