Skip to content

Set Maven compiler release to 17 and restore java17 build#102

Merged
jtnord merged 2 commits intojenkinsci:masterfrom
jtnord:java17
Jan 16, 2026
Merged

Set Maven compiler release to 17 and restore java17 build#102
jtnord merged 2 commits intojenkinsci:masterfrom
jtnord:java17

Conversation

@jtnord
Copy link
Member

@jtnord jtnord commented Jan 16, 2026

This library (and more generally all libraries) should not float java versions by picking up the latest from the parent pom.

This library is consumed by plugins, managed outside of Jenkins core (via the plugin-pom) and upgrading the bytecode will cause the plugin pom to no longer work with older (pre 25) versions of Jenkins and there is no need to do that.

Testing done

with java17 prior to this change

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.330 s
[INFO] Finished at: 2026-01-16T10:20:13Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.6.2:enforce (display-info) on project test-annotations:
[ERROR] Rule 2: org.apache.maven.enforcer.rules.version.RequireJavaVersion failed with message:
[ERROR] Detected JDK C:\Java\jdk-17.0.14+7 is version 17.0.14 which is not in the allowed range [21,).
[ERROR] -> [Help 1]

post this change

[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.052 s -- in org.jvnet.hudson.test.DummyTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- jar:3.5.0:jar (default-jar) @ test-annotations ---
[INFO] Building jar: D:\source\github\jenkinsci\lib-test-annotations\target\test-annotations-999999-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.987 s
[INFO] Finished at: 2026-01-16T10:21:08Z
[INFO] ------------------------------------------------------------------------

jenkinsci/jenkins#26018

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

the library should not float java versions nor pick them up from the parent pom.

The library is consumed by plugins, via the plugin-pom and upgrading the bytecode will cause the plugin pom to no longer work with older (pre 25) versions of Jenkins and there is no need to do that.
@jtnord jtnord requested a review from MarkEWaite January 16, 2026 10:25
@jtnord jtnord changed the title Set Maven compiler release to 17 Set Maven compiler release to 17 and restore java17 build Jan 16, 2026
put back java17 into the mix whilst we target java17
@jtnord jtnord merged commit 2f87da3 into jenkinsci:master Jan 16, 2026
14 checks passed
@jtnord jtnord deleted the java17 branch January 16, 2026 13:09
@MarkEWaite MarkEWaite added the bug label Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants