Repository navigation
Run GitHub actions integration tests with Java 16 - #456
Conversation
slachiewicz
left a comment
There was a problem hiding this comment.
We should remove java 15 and replace it with 16. Optionally we may add 17-ea
|
The |
|
Groovy and/or ASM nees to be updated. @rmannibucau , can you help? |
|
The offending test has a Groovy script in the POM. It uses the gmavenplus-plugin with an inline dependency on Groovy 3.0.7, which is the latest version of Groovy. According to the Groovy build, that version of Groovy uses ASM 9.0. But the ASM changelog says Java 17 support was only added with ASM 9.1. That version is only included in Groovy 4.0.0-alpha-2. Do we want to move to 4.0.0-alpha-2 for that? |
|
@mthmulders I'd move MavenITmng7045DropUselessAndOutdatedCdiApiTest to pure java or bsh I think to avoid this issue each 6 months maybe |
I could give that a try, but before I do that, let me make sure I understand the test. It verifies if the This could also be implemented with a Java source file that we try to compile - if compilation fails, the test should also fail. Did I understand it correctly? |
|
@mthmulders that's what the test does yes. The most important is the execution classloader which should rely on the plugin loader, can be done with a .java but must be executed in a mojo classloader (so exec-maven-plugin does a bit too much to test that accurately so not sure about a .java). |
|
I've tried to rewrite the Groovy script to a JUnit test. The test succeeds with both Maven 3.6.3 and 4.0.0-alpha-1-SNAPSHOT: Note that I switched the Geronimo dependency for the javax.enterprise one, as the Geronimo one gives The test runs using Surefire 3.0.0-M5 and JUnit 4.13.2. But that route doesn't help us, as we can't determine whether CDI 1.0 "leaked in" or not. To be continued - but given that I know nothing about bsh or how to run it from Maven, it will probably take a lot longer. If anyone else does, feel free to chime in. |
|
I gave BeanShell a try this evening, but I'm greeted with
So, to summarise:
If I understand correctly, we can't run this test using the exec-maven-plugin. From my experience, we can't run it with JUnit and we can't run it with Bsh either. I'm afraid we're running out of options.... I think there are not much other options left than moving to Groovy 4.0.0-alpha-2 and hoping not every new Java release will see this issue. |
a4dbc52 to
2df9be6
Compare
Turns out ASM 9.1 is not in Groovy 4.0.0-alpha-2 either - it is only in HEAD. According to the Groovy issue tracker, it may end up in Groovy 3.0.8 and/or 4.0.0-alpha-3. Both of them are not released at this point. Therefore, I will create a separate merge request to add Java 17-ea to the matrix, and this merge request will only add Java 16. We can then merge this one on short notice, and merge the other one when there is a suitable Groovy version available. |
No description provided.