Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently
https://repo1.maven.org/maven2/com/cognite/spark/datasource/cdf-spark-datasource-fatjar_2.13/3.2.1044/cdf-spark-datasource-fatjar_2.13-3.2.1044.pom
includes
Which isn't expected, fatjar should have (almost) no dependencies.
The jar itself though contains all the classes and applies shading
as expected.
It is then possible that pulling fatjar from maven central would pull duplicated classes
and if non-fatjar unshaded versions are picked up or a mix with fatjar ones, the
datasource would runtime-crash when used for example in Spark in DataBricks.
Let's remove chimney from commonSettings and move to per-target dependencies.
And for main library, looks like the simplest way to both
have it as part of fatJar and not have it in pom is to patch generated pom.
As for scala-library keeping it as-is, older fatjar setup also had it,
so not investigating for now.
Verified pom contents by running
fatJarShaded/publishLocal
and inspecting pomfrom filesystem.
And used
fatJarShaded/assembly
to generate fatjar and inspect withjar tf
to check that is has our classes and applies shading rules.
Did not yet verify in databricks, but even if this PR isn't enough to fix
running there it is still a step in the right directiion.
CDF-20156