Fix shading of multi-release BouncyCastle classes#47127
Merged
vcolin7 merged 2 commits intoAzure:mainfrom Nov 3, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the Maven Shade Plugin from version 3.6.0 to 3.6.1 across multiple POM files in the Azure SDK for Java repository. The update includes a critical fix in the KeyVault JCA module to properly handle multi-release JAR shading for BouncyCastle dependencies.
Key Changes:
- Updates maven-shade-plugin version from 3.6.0 to 3.6.1 across 16 POM files
- Adds OSGI metadata exclusion and multi-release JAR relocation workaround in azure-security-keyvault-jca
- Updates CHANGELOG.md to document the BouncyCastle shading fix
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| eng/versioning/external_dependencies.txt | Updates the centralized external dependency version from 3.6.0 to 3.6.1 |
| sdk/parents/azure-client-sdk-parent/pom.xml | Updates shade plugin version in parent POM |
| sdk/parents/azure-client-sdk-parent-v2/pom.xml | Updates shade plugin version in v2 parent POM |
| sdk/parents/clientcore-parent/pom.xml | Updates shade plugin version in clientcore parent POM |
| sdk/keyvault/azure-security-keyvault-jca/pom.xml | Updates shade plugin version and adds OSGI exclusion and multi-release JAR relocation configuration |
| sdk/keyvault/azure-security-keyvault-jca/CHANGELOG.md | Documents the fix for BouncyCastle multi-release JAR shading issue |
| sdk/serialization/azure-json/pom.xml | Updates shade plugin version |
| sdk/serialization/azure-xml/pom.xml | Updates shade plugin version |
| sdk/storage/azure-storage-blob-stress/pom.xml | Updates shade plugin version |
| sdk/storage/azure-storage-file-datalake-stress/pom.xml | Updates shade plugin version |
| sdk/storage/azure-storage-file-share-stress/pom.xml | Updates shade plugin version |
| sdk/template/azure-template-stress/pom.xml | Updates shade plugin version |
| sdk/cosmos/azure-cosmos-kafka-connect/pom.xml | Updates shade plugin version |
| sdk/cosmos/azure-cosmos-spark_3/pom.xml | Updates shade plugin version |
| sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml | Updates shade plugin version |
| sdk/cosmos/fabric-cosmos-spark-auth_3/pom.xml | Updates shade plugin version |
| sdk/clientcore/http-stress/pom.xml | Updates shade plugin version |
effbe08 to
fba5a35
Compare
09443fe to
de256ad
Compare
alzimmermsft
approved these changes
Nov 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Currently, we're not correctly shading release-specific BouncyCastle classes meant for multi-relase JARs. This is caused because the
maven-shade-plugindoes not properly support this at this time; the plugin does rewrite the class references and package names, but does not relocate the classes themselves (see this issue and this PR). This PR fixes the problem by manually relocating the classes in question. It also updates the plugin version from3.6.0to3.6.1.Fixes: #45277
Tests
Ran a small bash script to check the before and after status of multi-release classes:
Before
After
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines