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

Add Java 17 to build/test matrix #6364

Merged
merged 2 commits into from
Mar 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ properties([
])

def buildTypes = ['Linux', 'Windows']
def jdks = [8, 11]
def jdks = [8, 11, 17]

def builds = [:]
for (i = 0; i < buildTypes.size(); i++) {
Expand All @@ -30,6 +30,9 @@ for (i = 0; i < buildTypes.size(); i++) {
if (buildType == 'Windows' && jdk == 8) {
continue // unnecessary use of hardware
}
if (buildType == 'Windows' && jdk == 17) {
continue // TODO pending jenkins-infra/helpdesk#2822
basil marked this conversation as resolved.
Show resolved Hide resolved
}
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
Expand Down
16 changes: 16 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -818,5 +818,21 @@ 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>
<argLine>--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.base/java.util.concurrent=ALL-UNNAMED</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
22 changes: 22 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -822,5 +822,27 @@ 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
basil marked this conversation as resolved.
Show resolved Hide resolved
running on Java 17. When JENKINS-54842 is resolved, this can be deleted.
basil marked this conversation as resolved.
Show resolved Hide resolved
-->
<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
basil marked this conversation as resolved.
Show resolved Hide resolved
can be deleted.
-->
<spotless.check.skip>true</spotless.check.skip>
</properties>
</profile>
</profiles>
</project>
33 changes: 32 additions & 1 deletion test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ THE SOFTWARE.
<artifactId>maven-surefire-plugin</artifactId>
<!-- version specified in grandparent pom -->
<configuration>
<argLine>${jacocoSurefireArgs} -Xmx1g</argLine>
basil marked this conversation as resolved.
Show resolved Hide resolved
<systemPropertyVariables>
<hudson.maven.debug>${mavenDebug}</hudson.maven.debug>
<buildDirectory>${project.build.directory}</buildDirectory>
Expand Down Expand Up @@ -338,5 +337,37 @@ THE SOFTWARE.
</plugins>
</build>
</profile>
<profile>
<id>jdk-8-and-below</id>
<activation>
<jdk>(,1.8]</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${jacocoSurefireArgs} -Xmx1g</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jdk-9-and-above</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${jacocoSurefireArgs} -Xmx1g --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.base/java.util.concurrent=ALL-UNNAMED</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>