Appmod/java upgrade 20260614005200#6
Merged
Conversation
- Set maven.compiler.release=25 (was source/target 8) - Align Azure SDK via azure-sdk-bom 1.3.7; remove unused legacy azure-keyvault-core - Rename azure-keyvault-keys -> azure-security-keyvault-keys (BOM-managed versions) - Upgrade Maven plugins: compiler 3.13.0, surefire 3.5.2, dependency 3.8.1, resources 3.3.1, jar 3.4.2 - App.java: identity imports -> com.azure.identity.*; cipherText()/plainText() -> getCipherText()/getPlainText() - Security: upgraded Azure SDK from 2019 preview to current GA, reducing known-CVE exposure; auth flow unchanged
- Fix maven-dependency-plugin 3.8.1 copy-dependencies config: remove invalid excludeScope=test (redundant with includeScope=runtime) and a duplicate overWriteIfNewer line - mvn clean verify passes on JDK 25; bytecode major version 69 (Java 25) - Runnable jar target/keyvaultclient2.jar + 45 dependency jars in target/libs produced
…60614005200) - Add summary.md for the Java 8 -> 25 upgrade - Record commit hashes in progress.md for steps 3 and 5
- Add src/test/java/kvsdk4java2/AppTest.java: uses Mockito mockConstruction to replace Azure SDK builders/clients, exercising the sync + async encrypt/decrypt flow with no network or credentials - pom.xml: add JUnit 5 (junit-jupiter 5.11.4) and Mockito (mockito-core/junit-jupiter 5.23.0) test-scope deps; add surefire argLine -Dnet.bytebuddy.experimental=true for ByteBuddy on JDK 25 - mvn clean verify on JDK 25: BUILD SUCCESS, Tests run: 1, Failures: 0, Errors: 0
… properties in pom.xml
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.
This pull request modernizes the Java project by upgrading dependencies, updating code to use current Azure SDK APIs, and introducing comprehensive unit tests. The most important changes are as follows:
Dependency and Build System Upgrades:
pom.xmlto use Java 25, added and updated Azure SDK, JUnit, and Mockito dependencies, and switched to using the Azure SDK BOM for better dependency management. Also, upgraded Maven plugin versions and improved plugin configuration for testing. [1] [2] [3]Code Modernization and API Updates:
App.javato use the latest Azure SDK classes and method names (e.g., replaced deprecatedcipherText()andplainText()withgetCipherText()andgetPlainText()), and corrected import statements to match the new SDK structure. [1] [2] [3]Testing Improvements:
AppTest.javathat uses JUnit 6 and Mockito to mock Azure SDK clients and builders, allowing the main encryption/decryption logic to be tested without network or credential dependencies. This ensures that the application logic is verified in isolation.