Skip to content

Commit

Permalink
Drop support for Java 8 (jenkinsci#6083)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Dec 20, 2021
1 parent b81428f commit 13a04b4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 24 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ properties([

// TODO: Restore 'Windows' once https://groups.google.com/forum/#!topic/jenkinsci-dev/v9d-XosOp2s is resolved
def buildTypes = ['Linux']
def jdks = [8, 11]
def jdks = [11]

def builds = [:]
for(i = 0; i < buildTypes.size(); i++) {
Expand All @@ -29,7 +29,7 @@ for(j = 0; j < jdks.size(); j++) {
def jdk = jdks[j]
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
node(buildType == 'Linux' ? (jdk == 8 ? 'maven' : 'maven-11') : buildType.toLowerCase()) {
node(buildType == 'Linux' ? 'maven-11' : buildType.toLowerCase()) {
// First stage is actually checking out the source. Since we're using Multibranch
// currently, we can use "checkout scm".
stage('Checkout') {
Expand Down
1 change: 1 addition & 0 deletions core/src/main/java/jenkins/install/SetupWizard.java
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@ public void init(FilterConfig cfg) throws ServletException {
}

@Override
@SuppressFBWarnings(value = "UNVALIDATED_REDIRECT", justification = "TODO needs triage")
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
// Force root requests to the setup wizard
if (request instanceof HttpServletRequest && !Jenkins.get().getInstallState().isSetupComplete()) {
Expand Down
26 changes: 4 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ 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>
<java.level>8</java.level>
<animal.sniffer.skip>true</animal.sniffer.skip>
<java.level>11</java.level>

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

Expand Down Expand Up @@ -536,7 +536,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 javadoc:javadoc deploy</goals>
<goals>-DskipTests javadoc:javadoc deploy</goals>
<pushChanges>false</pushChanges>
<localCheckout>true</localCheckout>
<tagNameFormat>jenkins-@{project.version}</tagNameFormat>
Expand Down Expand Up @@ -581,8 +581,7 @@ THE SOFTWARE.
<artifactId>maven-compiler-plugin</artifactId>
<!-- Version specified in parent POM -->
<configuration>
<source>1.${java.level}</source>
<target>1.${java.level}</target>
<release>${java.level}</release>
<!-- default reuseCreated is more performant
feel free to uncomment if you have any issues on your platform
<compilerReuseStrategy>alwaysNew</compilerReuseStrategy>
Expand Down Expand Up @@ -743,22 +742,5 @@ THE SOFTWARE.
<failIfNoTests>false</failIfNoTests>
</properties>
</profile>
<profile>
<id>jdk11</id>
<properties>
<!-- TODO: https://issues.jenkins.io/browse/JENKINS-53788 (JDK11 issue on CI) -->
<doclint>none</doclint>
<maven.javadoc.skip>true</maven.javadoc.skip>
<!-- release is needed for reliable cross compilation. It is supported
starting JDK 9, but as the only earlier version we support is 8, it would
be either compiled by javac from 8 or one from a newer compiler that
correctly handle the release flag. This will replace both source and target
once we drop support for JDK 8 that only recognize source and target. -->
<maven.compiler.release>${java.level}</maven.compiler.release>
</properties>
<activation>
<jdk>11</jdk>
</activation>
</profile>
</profiles>
</project>
3 changes: 3 additions & 0 deletions src/spotbugs/spotbugs-excludes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
<Class name="hudson.model.AsyncAperiodicWork"/>
<Class name="hudson.model.AsyncPeriodicWork"/>
<Class name="hudson.model.Computer"/>
<Class name="hudson.model.Descriptor"/>
<Class name="hudson.model.DirectoryBrowserSupport$IsAbsolute"/>
<Class name="hudson.model.DownloadService$Downloadable"/>
<Class name="hudson.model.FileParameterValue"/>
Expand Down Expand Up @@ -399,6 +400,7 @@
<Class name="hudson.util.io.RewindableRotatingFileOutputStream"/>
<Class name="hudson.util.IOUtils"/>
<Class name="hudson.util.jna.Kernel32Utils"/>
<Class name="hudson.util.ProcessTree$UnixProcess"/>
<Class name="hudson.WebAppMain"/>
<Class name="jenkins.diagnosis.HsErrPidList"/>
<Class name="jenkins.fingerprints.FileFingerprintStorage"/>
Expand All @@ -417,6 +419,7 @@
<Class name="jenkins.security.s2m.ConfigDirectory"/>
<Class name="jenkins.security.stapler.StaplerDispatchValidator$ValidatorCache"/>
<Class name="jenkins.security.stapler.StaticRoutingDecisionProvider"/>
<Class name="jenkins.slaves.restarter.UnixSlaveRestarter"/>
<Class name="jenkins.SoloFilePathFilter"/>
<Class name="jenkins.util.groovy.GroovyHookScript"/>
<Class name="jenkins.util.io.FileBoolean"/>
Expand Down

0 comments on commit 13a04b4

Please sign in to comment.