-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Incorrect size and checksums are declared in published Gradle module metadata #4985
Comments
@jjohannes would you have any idea what is going on here? Nexus calculates the SHA and md5 checksums when we publish jars. It is your Gradle plugin that calculates them at build time. |
Thanks for the ping. Yes, the values computed in the plugin. I assume something is wrong there then. It's no wonder that the checksums differ, if the size differs. The plugin takes the size from the Jar here: https://github.com/gradlex-org/gradle-module-metadata-maven-plugin/blob/main/src/main/java/org/gradlex/maven/gmm/GradleModuleMetadataWriter.java#L201-L202 There is nothing fancy in the code. If the uploaded Jar has a different size, this means the Jar the plugin inspects and the uploaded one differ. Maybe the Jar is modified or replaced by another Maven plugin? I know that Maven plugins can do these things and it is a pita for Maven plugin development when it comes to combining plugin 🙁. Any idea if another plugin may cause this? Do we know if this is a new problem or does it exist for longer? I will have a look. Problem should not be hard to reproduce. |
@abarsov is this breaking something or is it just that you want this to be correct just because it should be? I, personally, think we shouldn't bother with these Gradle modules and stick with poms. Grade happily supports poms. If we publish anything other than poms, I think we should support SBOMs which are useful to lots of tooling not just Gradle. Jackson has lots of git repos and many of these repos have Maven submodules. It is hard to control the order in which the build tasks listed in parent poms and submodules poms run in. It is hard to validate the Gradle modules. Even if we fix them then later pom changes can break them again. |
It's not wrong for all Jackson modules. I just checked |
Shade plugin was my first guess, but Good luck @jjohannes ! I am hoping to publish 2.18.3 soon so it'd be great to resolve this issue first, if possible. |
It is not only the shade plugin, but also the moditec plugin. All these plugins (potentially) modify and rely on the My understanding of this has grown over the years. The order of things in the This is the list of all the ones that need correction:
I already have an extension of the Gradle integration test ready that gives this list. I'll create a PR tomorrow. Maybe this is not too complicated to fix, it looks like most "broken" modules have a parent POM involved. |
Yeah those are all multi-Maven-module projects/repos. All also use Moditect for |
Search before asking
Describe the bug
The library jackson-datatype-jdk8-2.18.2 (latest version actally) is published with an incorrect metadata.
jackson-datatype-jdk8-2.18.2.module declares invalid information about the artifact:
The actual parameters of jackson-datatype-jdk8-2.18.2.jar are as follows:
The same story is with some other libraries:
jackson-datatype-jsr310:2.18.2
jackson-datatype-guava:2.18.2
Version Information
2.18.2
Reproduction
No response
Expected behavior
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: