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

[JEP-236] [JENKINS-68570] Require Java 11 or newer #6083

Merged
merged 33 commits into from
Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c303a78
Drop support for Java 8
basil Dec 23, 2021
43e1649
Merge remote-tracking branch 'origin/master' into java11
basil Dec 25, 2021
0c778b7
Merge remote-tracking branch 'origin/master' into java11
basil Dec 25, 2021
f74298d
Add TODO comment
basil Dec 25, 2021
c6eae4d
Merge remote-tracking branch 'origin/master' into java11
basil Dec 27, 2021
b5513d8
Merge remote-tracking branch 'origin/master' into java11
basil Dec 29, 2021
b692e12
Merge remote-tracking branch 'origin/master' into java11
basil Jan 2, 2022
6d74bcc
Merge remote-tracking branch 'origin/master' into java11
basil Jan 3, 2022
2a6ee0a
Merge remote-tracking branch 'origin/master' into java11
basil Jan 7, 2022
598fdc9
Merge remote-tracking branch 'origin/master' into java11
basil Jan 21, 2022
8736757
Merge remote-tracking branch 'origin/master' into java11
basil Jan 31, 2022
35d4930
Fix Spotless
basil Jan 31, 2022
139c17f
Merge remote-tracking branch 'origin/master' into java11
basil Apr 15, 2022
2b21238
Merge remote-tracking branch 'origin/master' into java11
basil Apr 20, 2022
2ca44e5
Merge remote-tracking branch 'origin/master' into java11
basil Apr 22, 2022
1a5d528
Merge remote-tracking branch 'origin/master' into java11
basil May 14, 2022
2c05146
Merge remote-tracking branch 'origin/master' into java11
basil May 27, 2022
2cc572b
Merge remote-tracking branch 'origin/master' into java11
basil Jun 6, 2022
d195bfb
Bump Checkstyle
basil Jun 6, 2022
1409081
Merge branch 'master' into java11
timja Jun 19, 2022
74109dd
Merge remote-tracking branch 'origin/master' into java11
basil Jun 22, 2022
1d96882
Update parent POM
basil Jun 22, 2022
a244461
Merge branch 'master' into java11
basil Jun 22, 2022
e9d36a0
Inline relevant portions of pom.xml
basil Jun 22, 2022
2596883
JENKINS-68752 Ignore duplicate log recorder keys (#6673)
timja Jun 22, 2022
bf7ae88
Minify CSS for production releases of Jenkins (#6665)
janfaracik Jun 22, 2022
fee0d26
Improve and simplify SCSS classes and variables (#6667)
janfaracik Jun 22, 2022
42e7873
[JENKINS-68767] feat: Use user-friendly name in uninstaller view (#6666)
NotMyFault Jun 22, 2022
4c135ac
[JEP-230] [JENKINS-55582] Convert `instance-identity` to a detached p…
jglick Jun 22, 2022
3f24e79
Bump spring-framework-bom from 5.3.20 to 5.3.21 (#6664)
dependabot[bot] Jun 22, 2022
a51d145
Simplify
basil Jun 24, 2022
cdc42e8
Merge remote-tracking branch 'origin/master' into java11
basil Jun 24, 2022
7d88c52
https://github.com/jenkinsci/jenkins/pull/6083#discussion_r906199616
basil Jun 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ updates:
# Fails test automation; needs further investigation.
- dependency-name: "com.google.inject:guice-bom"

# Requires Java 11 starting with version 10.0.
- dependency-name: "com.puppycrawl.tools:checkstyle"
versions: [">=10.0"]

# Contains incompatible API changes and needs compatibility work.
- dependency-name: "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api"

Expand Down
2 changes: 1 addition & 1 deletion .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-Xmx1100m
-Xmx1100m --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
basil marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 1 addition & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,13 @@ properties([
])

def buildTypes = ['Linux', 'Windows']
def jdks = [8, 11, 17]
def jdks = [11, 17]
basil marked this conversation as resolved.
Show resolved Hide resolved

def builds = [:]
for (i = 0; i < buildTypes.size(); i++) {
for (j = 0; j < jdks.size(); j++) {
def buildType = buildTypes[i]
def jdk = jdks[j]
if (buildType == 'Windows' && jdk == 8) {
continue // unnecessary use of hardware
}
if (buildType == 'Windows' && jdk == 17) {
continue // TODO pending jenkins-infra/helpdesk#2822
}
Expand Down
5 changes: 2 additions & 3 deletions core/src/main/java/hudson/model/UpdateCenter.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
import net.sf.json.JSONObject;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.input.CountingInputStream;
import org.apache.commons.io.output.NullOutputStream;
import org.jenkinsci.Symbol;
import org.jvnet.localizer.Localizable;
import org.kohsuke.accmod.Restricted;
Expand Down Expand Up @@ -1422,8 +1421,8 @@ private void testConnection(URL url) throws IOException {
throw new HttpRetryException("Invalid response code (" + responseCode + ") from URL: " + url, responseCode);
}
} else {
try (InputStream is = connection.getInputStream()) {
IOUtils.copy(is, NullOutputStream.NULL_OUTPUT_STREAM);
try (InputStream is = connection.getInputStream(); OutputStream os = OutputStream.nullOutputStream()) {
IOUtils.copy(is, os);
}
}
} catch (SSLHandshakeException e) {
Expand Down
34 changes: 3 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci</groupId>
<artifactId>jenkins</artifactId>
<version>1.76</version>
<version>1.77</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -85,8 +85,6 @@ THE SOFTWARE.
<project.patchManagement.url>https://api.github.com</project.patchManagement.url>
<patch.tracker.serverId>jenkins-jira</patch.tracker.serverId>

<animal.sniffer.skip>${skipTests}</animal.sniffer.skip>

<changelog.url>https://www.jenkins.io/changelog</changelog.url>

<!-- Bundled Remoting version -->
Expand Down Expand Up @@ -380,10 +378,6 @@ THE SOFTWARE.
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
Expand All @@ -406,7 +400,7 @@ THE SOFTWARE.
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>9.3</version>
<version>10.3</version>
</dependency>
</dependencies>
<executions>
Expand Down Expand Up @@ -471,7 +465,7 @@ THE SOFTWARE.
<arguments>-P release,sign</arguments>
<!-- work around for a bug in javadoc plugin that causes the release to fail. see MRELEASE-271 -->
<preparationGoals>clean install</preparationGoals>
<goals>-DskipTests -Danimal.sniffer.skip=false -Dspotbugs.skip -Dmaven.checkstyle.skip -Dspotless.check.skip generate-resources javadoc:javadoc deploy</goals>
<goals>-DskipTests -Dspotbugs.skip -Dmaven.checkstyle.skip -Dspotless.check.skip generate-resources javadoc:javadoc deploy</goals>
<pushChanges>false</pushChanges>
<localCheckout>true</localCheckout>
<tagNameFormat>jenkins-@{project.version}</tagNameFormat>
Expand Down Expand Up @@ -647,27 +641,5 @@ THE SOFTWARE.
<failIfNoTests>false</failIfNoTests>
</properties>
</profile>
<profile>
<id>jdk-17-and-above</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<properties>
<!--
Animal Sniffer does not work on Java 17, but we cannot remove it from our configuration
entirely until we drop support for Java 8. As a temporary solution, we skip it when
running on Java 17. When JENKINS-54842 is resolved, this can be deleted.
-->
<animal.sniffer.skip>true</animal.sniffer.skip>

<!--
Spotless requires custom arguments to be added to .mvn/jvm.config when running on Java 17,
but we cannot add those custom arguments until we drop support for Java 8. As a temporary
workaround, we skip Spotless when running on Java 17. When JENKINS-68015 is resolved, this
can be deleted.
-->
<spotless.check.skip>true</spotless.check.skip>
</properties>
</profile>
</profiles>
</project>
5 changes: 4 additions & 1 deletion src/spotbugs/spotbugs-excludes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,10 @@
</And>
<And>
<Bug pattern="SSD_DO_NOT_USE_INSTANCE_LOCK_ON_SHARED_STATIC_DATA"/>
<Class name="hudson.model.ViewJob"/>
<Or>
<Class name="hudson.model.ViewJob"/>
<Class name="hudson.TcpSlaveAgentListener$ConnectionHandler"/>
</Or>
</And>
<And>
<Bug pattern="STATIC_IV"/>
Expand Down