You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2022/01/29 20:10:45 UTC

[logging-log4j2] branch master updated: Add Java 17 toolchain for CI build

This is an automated email from the ASF dual-hosted git repository.

mattsicker pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/master by this push:
     new 1aba1ce  Add Java 17 toolchain for CI build
1aba1ce is described below

commit 1aba1ce3e068ed9a8ff6ebd68905b2412719d986
Author: Matt Sicker <ma...@apache.org>
AuthorDate: Sat Jan 29 14:10:29 2022 -0600

    Add Java 17 toolchain for CI build
---
 .github/workflows/build.yml            | 14 +++++++++++--
 .github/workflows/maven-toolchains.xml | 37 ++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 5a5bbd3..dc03a3a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -20,10 +20,19 @@ jobs:
       - name: Checkout repository
         uses: actions/checkout@v2
 
+      - name: Setup JDK 17
+        uses: actions/setup-java@v2.5.0
+        with:
+          distribution: temurin
+          java-version: 17
+          java-package: jdk
+          architecture: x64
+          cache: 'maven'
+
       - name: Setup JDK 11
         uses: actions/setup-java@v2.5.0
         with:
-          distribution: 'zulu'
+          distribution: temurin
           java-version: 11
           java-package: jdk
           architecture: x64
@@ -49,4 +58,5 @@ jobs:
             --show-version --batch-mode --errors --no-transfer-progress \
             -DtrimStackTrace=false \
             -Dsurefire.rerunFailingTestsCount=2 \
-            -Dlog4j2.junit.fileCleanerSleepPeriodMillis=1000
+            -Dlog4j2.junit.fileCleanerSleepPeriodMillis=1000 \
+            --global-toolchains .github/workflows/maven-toolchains.xml
diff --git a/.github/workflows/maven-toolchains.xml b/.github/workflows/maven-toolchains.xml
new file mode 100644
index 0000000..344af63
--- /dev/null
+++ b/.github/workflows/maven-toolchains.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements. See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache license, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License. You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the license for the specific language governing permissions and
+  ~ limitations under the license.
+  -->
+<toolchains>
+  <toolchain>
+    <type>jdk</type>
+    <provides>
+      <version>17</version>
+    </provides>
+    <configuration>
+      <jdkHome>${env.JAVA_HOME_17_X64}</jdkHome>
+    </configuration>
+  </toolchain>
+  <toolchain>
+    <type>jdk</type>
+    <provides>
+      <version>11</version>
+    </provides>
+    <configuration>
+      <jdkHome>${env.JAVA_HOME_11_X64}</jdkHome>
+    </configuration>
+  </toolchain>
+</toolchains>