Plugin with Java 17 minimum dependencies

135 views
Skip to first unread message

Valentin Delaye (jonesbusy)

unread,
Apr 27, 2024, 3:24:20 AM4/27/24
to Jenkins Developers
Hi,

I'm a bit confused on the minimum required Java version for plugins

I maintain the https://github.com/jenkinsci/flyway-api-plugin which is an API plugin for flyway dependencies.

Since flyway 10 Java 17 is required.

I open a PR https://github.com/jenkinsci/flyway-api-plugin/pull/9/files

And changing the

<maven.compiler.release>17</maven.compiler.release>
<maven.compiler.testRelease>17</maven.compiler.testRelease>

And tested using bom the plugin against known consumer. No issue found

However is looks I cannot release the plugin https://github.com/jenkinsci/flyway-api-plugin/actions/runs/8858031719/job/24326194647 due to JDK11 used on CD.

- Is it expected ?
- Does this mean the plugin need a Java 17 runtime or only for compile ?
- Show I rollback until the toolchain is adapted for Java 17 ?

Thanks

Mark Waite

unread,
Apr 27, 2024, 12:40:23 PM4/27/24
to jenkin...@googlegroups.com
On Sat, Apr 27, 2024 at 1:24 AM Valentin Delaye (jonesbusy) <jone...@gmail.com> wrote:
Hi,

I'm a bit confused on the minimum required Java version for plugins

I maintain the https://github.com/jenkinsci/flyway-api-plugin which is an API plugin for flyway dependencies.

Since flyway 10 Java 17 is required.

I open a PR https://github.com/jenkinsci/flyway-api-plugin/pull/9/files

And changing the

<maven.compiler.release>17</maven.compiler.release>
<maven.compiler.testRelease>17</maven.compiler.testRelease>

And tested using bom the plugin against known consumer. No issue found

However is looks I cannot release the plugin https://github.com/jenkinsci/flyway-api-plugin/actions/runs/8858031719/job/24326194647 due to JDK11 used on CD.

- Is it expected ?

Yes, that's expected because no Jenkins core version requires Java 17 as its minimum Java version.
 
- Does this mean the plugin need a Java 17 runtime or only for compile ?

I believe that when you set maven.compiler.release to 17, it is generating Java 17 byte code.  That will require Java 17 at runtime.
 
- Show I rollback until the toolchain is adapted for Java 17 ?

I would rollback until the toolchain supports Java 17 later this year.  It might be in the weekly release as early as July or August.
 
Mark Waite

Basil Crow

unread,
Apr 27, 2024, 1:26:58 PM4/27/24
to jenkin...@googlegroups.com

Ullrich Hafner

unread,
Apr 27, 2024, 2:56:06 PM4/27/24
to Jenkins Developers
At least it makes sense to rise an issue for the CD toolchain so this problem will not be forgotten when we switch to Java 17 in September.

You can do JDK 17 releases using the manual release process though, an example is available at https://github.com/jenkinsci/autograding-plugin. This plugin also has a dependency to a Java 17 library so I needed to switch to Java a 17 for the plugin as well.

Ulli 

Message has been deleted

m...@basilcrow.com

unread,
May 6, 2024, 12:12:47 PM5/6/24
to Jenkins Developers
On Saturday, April 27, 2024 at 11:56:06 AM UTC-7 ull...@gmail.com wrote:
At least it makes sense to rise an issue for the CD toolchain so this problem will not be forgotten when we switch to Java 17 in September.

Have we filed an issue for the CD toolchain?

Valentin Delaye (jonesbusy)

unread,
May 7, 2024, 12:53:15 AM5/7/24
to Jenkins Developers

Hervé

unread,
May 7, 2024, 9:25:55 AM5/7/24
to Jenkins Developers
Hello,

I should have probably let existing maintainers opening a pull request for that but here is a proposed change to bump the Java version used by the cd GitHub Action:

https://github.com/jenkins-infra/github-reusable-workflows/issues/30#issuecomment-2098397213
https://github.com/jenkins-infra/github-reusable-workflows/pull/31

WDYT?

If accepted, we could plan a new release of https://github.com/jenkins-infra/github-reusable-workflows

timja...@gmail.com

unread,
May 7, 2024, 10:08:47 AM5/7/24
to Jenkins Developers
Hi

as Jesse said in the PR, this change should be safe to do now so +1 from me.

Basil Crow

unread,
May 7, 2024, 2:41:48 PM5/7/24
to jenkin...@googlegroups.com
Yes, I think the default should be changed to Java 17 and a new
version released for the reasons already given. Why wasn't the
adoption of such a release (along with updating the Java version value
in the Jenkins security scan workflow, pending
https://github.com/jenkins-infra/jenkins-security-scan/issues/29)
performed when we swept through the ecosystem adding Java 17/21 builds
to Jenkinsfiles?

Valentin Delaye (jonesbusy)

unread,
May 8, 2024, 12:47:52 AM5/8/24
to Jenkins Developers
+1

timja...@gmail.com

unread,
May 8, 2024, 3:47:14 AM5/8/24
to Jenkins Developers
v1 of the reusable workflows is now running on Java 17, thanks all

Basil Crow

unread,
Aug 8, 2024, 12:44:34 PM8/8/24
to jenkin...@googlegroups.com
On Wed, May 8, 2024 at 12:47 AM timja...@gmail.com <timja...@gmail.com> wrote:
>
> [v2] of the reusable workflows is now running on Java 17

Adopted in critical plugin consumers this week.
Reply all
Reply to author
Forward
0 new messages