Skip to content

[#444] Update Maven properties for Java compatibility#445

Open
swlodarski-sumoheavy wants to merge 1 commit into
bitpay:10.3.xfrom
swlodarski-sumoheavy:10.3.x-compatibility
Open

[#444] Update Maven properties for Java compatibility#445
swlodarski-sumoheavy wants to merge 1 commit into
bitpay:10.3.xfrom
swlodarski-sumoheavy:10.3.x-compatibility

Conversation

@swlodarski-sumoheavy
Copy link
Copy Markdown
Collaborator

Problem

Dependabot PRs upgrading dependencies (JUnit 6.x and Mockito 5.x) were causing test failures on Java 11 and earlier versions. The newer library versions require Java 12+ and are not backwards compatible.

Solution

Restructured the Maven configuration to support both modern and legacy Java versions:

Default Configuration (Java 12+):

  • Java compiler source/target: 11
  • JUnit: 6.1.0
  • Mockito: 5.23.0

Java 11 and Earlier Profile:

  • Added java11minus profile that automatically activates for JDK 11 and below
  • Java compiler source/target: 1.8
  • JUnit: 5.9.3 (compatible with Java 8-11)
  • Mockito: 4.11.0 (compatible with Java 8-11)

Changes

  • Updated default dependency versions to latest (Java 12+ compatible)
  • Added Maven profile java11minus with activation condition (,12)
  • Profile overrides dependency versions with Java 8-11 compatible versions

Impact

  • Dependabot can now safely upgrade dependencies without breaking Java 11 builds
  • Java 12+ users get the latest library versions
  • Java 8-11 users continue to have a working build with compatible library versions
  • No manual configuration required - Maven automatically selects the appropriate profile based on JDK version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Analyze JUnit major bump (5.9.3 → 6.1.0) in PR #442 Analyze Mockito major bump (4.11.0 → 5.0.0) in PR #433

1 participant