mirror of https://github.com/jenkinsci/jenkins.git
[JEP-236] [JENKINS-68570] Require Java 11 or newer (#6083)
This commit is contained in:
parent
6b5c21debd
commit
c60ea9210c
|
@ -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"
|
||||
|
||||
|
|
|
@ -13,22 +13,19 @@ properties([
|
|||
])
|
||||
|
||||
def buildTypes = ['Linux', 'Windows']
|
||||
def jdks = [8, 11, 17]
|
||||
def jdks = [11, 17]
|
||||
|
||||
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
|
||||
}
|
||||
builds["${buildType}-jdk${jdk}"] = {
|
||||
// see https://github.com/jenkins-infra/documentation/blob/master/ci.adoc#node-labels for information on what node types are available
|
||||
def agentContainerLabel = jdk == 8 ? 'maven' : 'maven-' + jdk
|
||||
def agentContainerLabel = 'maven-' + jdk
|
||||
if (buildType == 'Windows') {
|
||||
agentContainerLabel += '-windows'
|
||||
}
|
||||
|
|
20
core/pom.xml
20
core/pom.xml
|
@ -719,7 +719,8 @@ THE SOFTWARE.
|
|||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<!-- Version specified in grandparent POM -->
|
||||
<configuration>
|
||||
<argLine>@{jacocoSurefireArgs}</argLine>
|
||||
<!-- Make sure to keep the directives in test/pom.xml and war/pom.xml in sync with these. -->
|
||||
<argLine>@{jacocoSurefireArgs} --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.desktop/com.sun.beans.introspect=ALL-UNNAMED</argLine>
|
||||
<forkCount>0.5C</forkCount>
|
||||
<reuseForks>false</reuseForks>
|
||||
</configuration>
|
||||
|
@ -821,23 +822,6 @@ THE SOFTWARE.
|
|||
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>jdk-9-and-above</id>
|
||||
<activation>
|
||||
<jdk>[9,)</jdk>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<!-- Make sure to keep the directives in test/pom.xml and war/pom.xml in sync with these. -->
|
||||
<argLine>@{jacocoSurefireArgs} --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.desktop/com.sun.beans.introspect=ALL-UNNAMED</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>enable-jacoco</id>
|
||||
<build>
|
||||
|
|
|
@ -114,7 +114,6 @@ import jenkins.util.io.OnMaster;
|
|||
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;
|
||||
|
@ -1422,8 +1421,8 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas
|
|||
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) {
|
||||
|
|
34
pom.xml
34
pom.xml
|
@ -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>
|
||||
|
||||
|
@ -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 -->
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
|
|
@ -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"/>
|
||||
|
|
30
test/pom.xml
30
test/pom.xml
|
@ -42,6 +42,11 @@ THE SOFTWARE.
|
|||
<mavenDebug>false</mavenDebug>
|
||||
<!-- Filled in by jacoco-maven-plugin -->
|
||||
<jacocoSurefireArgs />
|
||||
<!--
|
||||
Filled in by maven-hpi-plugin from the MANIFEST.MF entry in jenkins.war, but we provide a default value for the benefit of IDEs.
|
||||
Make sure to keep the directives in core/pom.xml and war/pom.xml in sync with these.
|
||||
-->
|
||||
<jenkins.addOpens>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.desktop/com.sun.beans.introspect=ALL-UNNAMED</jenkins.addOpens>
|
||||
<!-- Filled in by maven-hpi-plugin with the path to org-netbeans-insane-hook.jar extracted from jenkins-test-harness -->
|
||||
<jenkins.insaneHook />
|
||||
</properties>
|
||||
|
@ -367,30 +372,5 @@ THE SOFTWARE.
|
|||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>jdk-8-and-below</id>
|
||||
<activation>
|
||||
<jdk>(,1.8]</jdk>
|
||||
</activation>
|
||||
<properties>
|
||||
<!--
|
||||
Filled in by maven-hpi-plugin from the MANIFEST.MF entry in jenkins.war, but we provide a default value for the benefit of IDEs.
|
||||
-->
|
||||
<jenkins.addOpens />
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>jdk-9-and-above</id>
|
||||
<activation>
|
||||
<jdk>[9,)</jdk>
|
||||
</activation>
|
||||
<properties>
|
||||
<!--
|
||||
Filled in by maven-hpi-plugin from the MANIFEST.MF entry in jenkins.war, but we provide a default value for the benefit of IDEs.
|
||||
Make sure to keep the directives in core/pom.xml and war/pom.xml in sync with these.
|
||||
-->
|
||||
<jenkins.addOpens>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.desktop/com.sun.beans.introspect=ALL-UNNAMED</jenkins.addOpens>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue