jackson-module-scala
jackson-module-scala copied to clipboard
Support Gradle 6 version alignment with Jackson Scala module (`jackson-module-scala`)
(as background, see https://github.com/FasterXML/jackson-databind/issues/2726)
So, Jackson 2.12 is adding support for Gradle version alignment, using mechanism supported by Gradle 6.
@jjohannes contributed this for other modules and hopefully can help, or at least indicate whether this is feasible with sbt build. There may also be changes needed to jackson-integration-tests test repo, depending on whether metadata may be added.
@cowtowncoder the scala module appears in the main BOM file already. Example: https://oss.sonatype.org/content/repositories/snapshots/com/fasterxml/jackson/jackson-bom/2.12.0-rc2-SNAPSHOT/jackson-bom-2.12.0-rc2-20201103.195011-11.pom
Is the aim to have scala module publish a .module file https://oss.sonatype.org/content/repositories/snapshots/com/fasterxml/jackson/core/jackson-databind/2.12.0-rc2-SNAPSHOT/jackson-databind-2.12.0-rc2-20201115.032546-135.module ?
I haven't found any sbt support or sbt plugin support fo such a file. All in all, I suspect it is best to see if there is community demand for this before expending effort on it.
This is a new feature for Jackson 2.12, so community demand is bit of a chicken/egg problem. But I filed issue more as likely placeholder, to surface it and maybe get contributions, help. So expectation was not that this is a must-have at this point: if there is no sbt support that would probably be tricky to pull off.
In practice, this is not a problem for the alignment use case, because the Scala module has a dependency to Jackson Core with the same version. The transitive dependencies of Jackson Core (which has the module file) will then take care of the alignment to that version (see https://github.com/FasterXML/jackson-integration-tests/issues/6 for details).
Supporting Gradle Metadata (.module) with sbt and in Gradle's own Scala support is however very interesting in general. I believe we could get to a setup where, on the long run, encoding the Scala version in the name of the module would not be necessary anymore. As with Gradle Metadata you could publish all Jars as different variants under one GAV coordinate.
At Gradle, we just did not get around to push this topic yet. But if someone from the Scala community is happening to read this and interested in this, please feel free to reach out to me.
Sounds good; this issue can remain open so that others might be able to find it.