Skip to content

build: run CI on JDK 11; lock API surface to Java 8; bump to 8.2.2#168

Merged
petrsnd merged 1 commit into
OneIdentity:mainfrom
petrsnd:chore/fix-jdk11-and-bump-8.2.2
May 28, 2026
Merged

build: run CI on JDK 11; lock API surface to Java 8; bump to 8.2.2#168
petrsnd merged 1 commit into
OneIdentity:mainfrom
petrsnd:chore/fix-jdk11-and-bump-8.2.2

Conversation

@petrsnd
Copy link
Copy Markdown
Member

@petrsnd petrsnd commented May 28, 2026

The v8.2.1 release pipeline (build 366149) failed before publish because spotbugs-maven-plugin:4.9.8.3 requires JDK 11 to execute, but the Maven build task was pinned to jdkVersionOption: '1.8'. As a result the v8.2.1 security content was tagged but never landed on Maven Central.

Changes

  • pipeline-templates/build-steps.yml jdkVersionOption: '1.8''1.11' (lets spotbugs run).
  • pom.xml add <release>8</release> to maven-compiler-plugin alongside the existing <source>/<target>1.8. This explicitly restricts the API surface to the Java 8 stdlib, which prevents accidental use of Java 9+ methods (e.g. String.strip(), List.of()) that would compile fine on JDK 11 but NoSuchMethodError at runtime on customer JDK 8 deployments.
  • pom.xml <revision> 8.2.1-SNAPSHOT8.2.2-SNAPSHOT
  • pipeline-templates/global-variables.yml semanticVersion 8.2.18.2.2

No source changes. The v8.2.1 security content (TLS 1.2 floor in RestClient + EventListener) ships unchanged under the 8.2.2 label.

Verification

Locally on JDK 11:

mvn -DskipTests -Drevision=8.2.2 verify

Produces target/safeguardjava-8.2.2.jar. javap -v on a compiled class reports major version: 52 (Java 8 bytecode), confirming customer compatibility is preserved.

Release note

After merge, push tag v8.2.2 to trigger Maven Central publish. The orphan v8.2.1 tag will remain in history pointing at the failed-publish commit; no harm leaving it.

The spotbugs-maven-plugin 4.9.8.3 enforced by Build-Steps requires
JDK 11 to execute, which caused the v8.2.1 release pipeline to fail
before publish. Switch the Maven build task to JDK 11 so spotbugs
runs, while keeping the emitted bytecode targeted at Java 8 for
customer compatibility.

- pipeline-templates/build-steps.yml: jdkVersionOption 1.8 -> 1.11
- pom.xml (maven-compiler-plugin): add <release>8</release> alongside
  the existing <source>/<target>1.8 so the compiler also restricts the
  API surface to the Java 8 stdlib (prevents accidental use of 9+
  methods that would NoSuchMethodError at runtime on customer JDK 8).
- pom.xml: bump <revision> 8.2.1-SNAPSHOT -> 8.2.2-SNAPSHOT
- pipeline-templates/global-variables.yml: semanticVersion 8.2.1 -> 8.2.2

Verified locally: 'mvn -DskipTests -Drevision=8.2.2 verify' on
JDK 11 produces safeguardjava-8.2.2.jar; javap reports class major
version 52 (Java 8). No source changes; v8.2.1 security content
ships unchanged.
@petrsnd petrsnd requested a review from a team as a code owner May 28, 2026 04:56
@petrsnd petrsnd merged commit 390d57a into OneIdentity:main May 28, 2026
4 checks passed
@petrsnd petrsnd deleted the chore/fix-jdk11-and-bump-8.2.2 branch May 28, 2026 05:09
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.

1 participant