Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-68147] Support Java 17 #75

Closed
wants to merge 10 commits into from

Conversation

bulanovk
Copy link
Contributor

@bulanovk bulanovk commented Jul 8, 2022

JENKINS-68147 Support Java 17

Add support of JDK17 using org.jenkins-ci:version-number library

@bulanovk
Copy link
Contributor Author

Any chance to be merged?

@notaz
Copy link

notaz commented Aug 28, 2022

FWIW this still doesn't work with the version coming from a macos node:

WARNING	h.ExpressionFactory2$JexlExpression#evaluate: Caught exception evaluating: m.data(c) in /computer/. Reason: java.lang.IllegalArgumentException: 17 is not a supported JVM version pattern
java.lang.IllegalArgumentException: 17 is not a supported JVM version pattern
	at hudson.plugin.versioncolumn.JVMVersionComparator.computeMajorMinor(JVMVersionComparator.java:77)
	at hudson.plugin.versioncolumn.JVMVersionComparator.<init>(JVMVersionComparator.java:64)
	at hudson.plugin.versioncolumn.JVMVersionComparator.<init>(JVMVersionComparator.java:57)
	at hudson.plugin.versioncolumn.JVMVersionMonitor.data(JVMVersionMonitor.java:75)
% java --version
java 17 2021-09-14 LTS
Java(TM) SE Runtime Environment (build 17+35-LTS-2724)
Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing)

pom.xml Outdated
Comment on lines 61 to 65
<dependency>
<groupId>org.jenkins-ci</groupId>
<artifactId>version-number</artifactId>
<version>1.10</version>
</dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already included in Jenkins core as of 2.342, so rather than duplicate the library in this plugin, I suggest bumping the core baseline to 2.346 or later.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like deleting this new dependency and instead doing:

diff --git a/pom.xml b/pom.xml
index 22f57f5..573bf80 100644
--- a/pom.xml
+++ b/pom.xml
@@ -51,15 +51,15 @@
     <properties>
         <revision>2.3</revision>
         <changelist>-SNAPSHOT</changelist>
-        <jenkins.version>2.277.4</jenkins.version>
+        <jenkins.version>2.346.1</jenkins.version>
         <gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
     </properties>
     <dependencyManagement>
         <dependencies>
             <dependency>
                 <groupId>io.jenkins.tools.bom</groupId>
-                <artifactId>bom-2.277.x</artifactId>
-                <version>984.vb5eaac999a7e</version>
+                <artifactId>bom-2.346.x</artifactId>
+                <version>1382.v7d694476f340</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented in 503ada6

@MarkEWaite MarkEWaite added the enhancement Improvement or new feature label Nov 10, 2022
Comment on lines +71 to +72
{"1.8.0", JavaSpecificationVersion.JAVA_6.toReleaseVersion()},
{"11.0.1", JavaSpecificationVersion.JAVA_11.toReleaseVersion()},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why aren't these toClassVersion? This parameter represents a class version, not a release version.

@MarkEWaite MarkEWaite changed the title JENKINS-68147 Support Java17 org.jenkins-ci:version-number [JENKINS-68147] Support Java 17 Nov 10, 2022
@MarkEWaite
Copy link
Contributor

Superseded by #88

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement or new feature
Projects
None yet
4 participants