From c29ee4a35ceed8333cbbc10163ce682a1de38142 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Fri, 21 May 2021 08:54:49 +1000 Subject: [PATCH] upgrade to more recent Jenkins core version Signed-off-by: olivier lamy --- .github/workflows/ci.yml | 52 +++++++++++++++++++ jenkins-client/pom.xml | 37 ++++++++++--- .../integration/JobConfigurationIT.java | 1 + .../src/test/resources/log4j2-test.xml | 35 +++++++++++++ pom.xml | 16 +++--- 5 files changed, 126 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 jenkins-client/src/test/resources/log4j2-test.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..44d716db --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,52 @@ +# 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. + +name: GitHub CI + +on: [push, pull_request] + +jobs: + build: + + strategy: + matrix: + os: [ubuntu-latest,windows-latest, macOS-latest] + java: [8, 11] + fail-fast: false + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up cache for ~./m2/repository + uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }} + restore-keys: | + maven-${{ matrix.os }}-java${{ matrix.java }}- + maven-${{ matrix.os }}- + + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + + - name: Build with Maven + run: mvn verify -e -B -V diff --git a/jenkins-client/pom.xml b/jenkins-client/pom.xml index 2cbc3df9..1e312577 100644 --- a/jenkins-client/pom.xml +++ b/jenkins-client/pom.xml @@ -38,12 +38,6 @@ dom4j - - org.jvnet.hudson - xstream - test - - net.sf.json-lib json-lib @@ -87,6 +81,19 @@ + + org.apache.logging.log4j + log4j-slf4j-impl + test + + + + org.jenkins-ci.main + jenkins-core + ${jenkins-version} + test + + junit junit @@ -163,6 +170,24 @@ + + java9+ + + [9,) + + + + javax.xml.bind + jaxb-api + 2.3.1 + + + org.glassfish.jaxb + jaxb-runtime + 2.3.1 + + + diff --git a/jenkins-client/src/test/java/com/offbytwo/jenkins/integration/JobConfigurationIT.java b/jenkins-client/src/test/java/com/offbytwo/jenkins/integration/JobConfigurationIT.java index 11571aa8..6512513a 100644 --- a/jenkins-client/src/test/java/com/offbytwo/jenkins/integration/JobConfigurationIT.java +++ b/jenkins-client/src/test/java/com/offbytwo/jenkins/integration/JobConfigurationIT.java @@ -8,6 +8,7 @@ import javax.xml.bind.JAXBException; import java.io.IOException; import java.net.URISyntaxException; +import java.util.Objects; import static org.junit.Assert.assertTrue; diff --git a/jenkins-client/src/test/resources/log4j2-test.xml b/jenkins-client/src/test/resources/log4j2-test.xml new file mode 100644 index 00000000..e77cc82a --- /dev/null +++ b/jenkins-client/src/test/resources/log4j2-test.xml @@ -0,0 +1,35 @@ + + + + + + + + %d %p %c{1.} [%t] %m%n + + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss} %-5p %c:%L - %m%n + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index f88539d9..aae47937 100644 --- a/pom.xml +++ b/pom.xml @@ -51,11 +51,10 @@ 2.0.0 - 1.644 + 2.222.4 4.12 3.0.0 2.4 - 1.4.7-jenkins-1 3.9 2.4 4.5.8 @@ -110,10 +109,9 @@ - org.jvnet.hudson - xstream - ${xstream.version} - test + org.jenkins-ci.main + jenkins-core + ${jenkins-version} @@ -188,7 +186,7 @@ org.jenkins-ci.main jenkins-test-harness - ${jenkins-version} + 2.71 org.assertj @@ -199,12 +197,12 @@ org.slf4j slf4j-api - 1.7.25 + 1.7.30 org.apache.logging.log4j log4j-bom - 2.12.1 + 2.14.0 import pom