-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix failing tests in java17 CI run #198
Conversation
Sounds good, thank you for this. On Gradle module plugin... is that the gradle module metadata thing? It should only be needed with JDK 8 build (for releases). |
8b14541
to
0837e65
Compare
349f97e
to
ba48549
Compare
Yes - that plugin. I simply can't get that plugin to work - I either end up with it not working (the .module files it is supposed to produce do not get produced) or that plugin ends up causing the build to fail. It may require us to choose - support that funky plugin or be able to run the tests in JDK 17. In the end, the .module file is only a minor nicety - Gradle is well able to use poms, why we need to hack the pom and have this weird .module too - I struggle to see the real benefit. |
Yeah I hear you. At the same time, dropping something that was working up until now (for couple of versions) does not sound good either. I do not know how valuable module info files are; I got the impression they might be more of an experimental feature earlier. But maybe its status has improved. But let's see if we can get help: @jjohannes I think you know about this module, right? |
Thanks for letting me know. I am certainly interested in fixing this in the plugin, if it wrongly throws this error in certain cases. As a first step, can you upgrade the plugin to Not sure how the different Java version can be responsible for this, but I'll investigate. |
@jjohannes thanks for the input - v0.3.0 still has same problem |
So I don't know why this only fails in the Java 17 build on CI, but this is a valid problem with the build. jackson-module-afterburner uses the maven shade plugin which generates a "new POM" that is then published. This POM no longer contains the comment. You can see the path in the error message:
This is already broken. If you look at he published POM, you see that it also misses the comment: The real fix would be to add the comment to the |
in fairness, XML comments are regarded as nice but non-essential - tools keep them or lose them but hardly anyone makes that behaviour controllable |
Sure. One can debate if it was the best decision to use a comment like this by Gradle. But no matter if one likes it or not, that's how it works. So if we want to fix it, we need to add that comment to the pom. In any case I think this is completely unrelated to this PR. The build is already broken on |
@pjfanning can you remove the plugin version upgrade commit again from this PR? @cowtowncoder can you integrate it as it is, as the build failure is not new from this PR? Then we can open a separate issue for this. If I find some time next week, I can check how this could be fixed. |
Ok sounds good, I can merge this. EDIT: Actually change would remove Gradle module metadata generation from all components, not just Afterburner/Blackbird. |
change profile ids only run gradle module on java8 due to issues remove tabs Update pom.xml Update pom.xml Update pom.xml Update pom.xml upgrade gradle module plugin Update pom.xml Update pom.xml
715c740
to
6df8246
Compare
Okay looks good; will merge, need to manually push to 2.15 and master as well. I wonder if we can have downstream tests to verify successful publishing of GMM (ditto for OSGi metadata). But first things first. |
Merged to 2.15 and master as well. |
The test I added here was supposed to inform about issues like this: But it's not "strict" enough. I will have a look. I should also upgrade the Gradle version there to make |
Applies similar solution as: FasterXML/jackson-modules-base#198
* Rework 'Gradle Metadata has been published' test * Add exceptions for components where Gradle metadata is currently missing * Fix MixinForJava8DateTimesTest on Java 17 Applies similar solution as: FasterXML/jackson-modules-base#198
Relates to #186
See https://github.com/FasterXML/jackson-modules-base/actions/runs/4039573403
Unfortunately, this change stops the gradle-module-plugin working. It does appear to fix the tests. I tried reworking how that gradle-module-plugin is declared but nothing seems to work.
https://github.com/FasterXML/jackson-modules-base/actions/runs/4080247967/jobs/7032511522