Skip to content
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 multi-release jar shading #1225

Merged

Conversation

vishalkarve15
Copy link
Contributor

No description provided.

@vishalkarve15
Copy link
Contributor Author

vishalkarve15 commented May 14, 2024

If we try to include the connector jar in maven-shade-plugin, it breaks the build with this error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.3:shade (default) on project core: Error creating shaded jar: Problem shading JAR /Users/vkarve/.m2/repository/com/google/cloud/spark/spark-bigquery-with-dependencies_2.12/0.33.0/spark-bigquery-with-dependencies_2.12-0.33.0.jar entry META-INF/versions/17/com/fasterxml/jackson/core/io/doubleparser/FastDoubleSwar.class: java.lang.IllegalArgumentException: Unsupported class file major version 61 -> [Help 1]

Steps to reproduce:

  • create a maven project
  • add a dependency on com.google.cloud.spark:spark-bigquery-with-dependencies_2.12 >= 0.33.0
  • add maven-shade-plugin with at least 1 relocation rule (can be no-op)

@vishalkarve15
Copy link
Contributor Author

vishalkarve15 commented May 14, 2024

This happens because starting 0.33.0, we upgraded jackson-core from 2.14.x to 2.15.x which is a Multi-release jar which adds META-INF/versions/**

@vishalkarve15
Copy link
Contributor Author

/gcbrun

@vishalkarve15 vishalkarve15 requested a review from isha97 May 14, 2024 08:54
@vishalkarve15 vishalkarve15 merged commit 876dbe7 into GoogleCloudDataproc:master May 14, 2024
9 checks passed
@vishalkarve15 vishalkarve15 deleted the fixMultirelease branch May 14, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants