On Mon, Feb 3, 2020 at 9:46 AM Jendrik Johannes <[email protected]> wrote:
> Hello from Gradle, > > > Hi there! > Maybe the following blog post about version alignment by using a BOM (with > Gradle 6), is of interest for some who use Jackson in Gradle builds. It uses > Jackson, and the Jackson BOM, as an example: > > https://blog.gradle.org/alignment-with-gradle-module-metadata > > Very interesting. Will need read with thought.Thank you for sharing this. In a nutshell, Gradle 6 allows you to publish dependencies on platforms (BOMs) together with each module. By this mechanism, any Jackson module you use automatically pulls in the corresponding BOM, which in turn aligns all other Jackson modules on the dependency graph to the same version. This avoids misaligned versions if different modules are added through transitive dependencies. The example is described in more detail in the post. > > > For this to work, the modules need to publish Gradle Module Metadata (GMM) in > addition to their POM files. This new metadata format was introduced recently > and is now fully supported in Gradle 6: > > https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html > > https://blog.gradle.org/gradle-metadata-1.0 > > > Gradle also offers an API to add additional metadata that was not published. > I created a small Gradle plugin which does that for all Jackson versions that > have a BOM. You can use that in your Gradle build if you want to try what is > described in the blog post: > > https://plugins.gradle.org/plugin/de.jjohannes.missing-metadata-jackson > > > From what I see about how Jackson is published, I realize that it is not easy > to actually publish this additional metadata for future versions. (Although, > for the benefit of Gradle users, it would be a great thing!) > > In any case, I want to offer support from the Gradle side if there should be > interest in this topic from the Jackson developers. While using Gradle as > build tool makes it easy to publish the additional metadata, it is also > possible to find solutions with Maven builds. We are exploring that, for > example, with Guava's build which has some other interesting use cases > solvable with GMM (https://blog.gradle.org/guava). > > > Yes, I think this is an area where we would be interested in finding improvements. It is probably true that on short term it may be challenging to provide metadata, but at the same time Jackson is producing some metadata using non-native tooling: - OSGi metadata has been generated with Felix plug-in for years now (and mostly works, although project relies on OSGi users to report issues as tooling can only verify some problems) - Java 9+ module info is generated using Moditect plug-in since JDK tooling only available on JDK 9 and later (which won't work too well for producing versions usable on Java 8 and earlier) so perhaps there could be a way to include some more information even if build itself uses Maven. -+ Tatu +- > Regards, > Jendrik > > -- > You received this message because you are subscribed to the Google Groups > "jackson-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jackson-user/20edbae4-a327-48b4-b056-079661663db2%40googlegroups.com > <https://groups.google.com/d/msgid/jackson-user/20edbae4-a327-48b4-b056-079661663db2%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/CAGrxA240-zy7Nc%2BBBQoGQm0F3cP8EQkdR1C--_QcSQd1qgKFwg%40mail.gmail.com.
