diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 000000000..57b198eea --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,60 @@ +# 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: Java CI + +on: [push, pull_request] + +permissions: + contents: read + +jobs: + build: + + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + # All LTS versions plus the current version + java: [ 8, 11, 17 ] + experimental: [false] +# include: +# - java: 20-ea +# os: ubuntu-latest +# experimental: true +# - java: 20-ea +# os: windows-latest +# experimental: true +# - java: 20-ea +# os: macos-latest +# experimental: true + fail-fast: false + + steps: + - uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - name: Build with Maven + run: mvn -V --file pom.xml --no-transfer-progress -DtrimStackTrace=false -P-use-toolchains diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ae230bf6e..000000000 --- a/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ -# 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. - -language: java -dist: trusty -sudo: false - -arch: - - amd64 - - arm64 - -addons: - apt: - packages: - - maven - -# Use some Oracle JDKs to avoid certificate issues. -# openjdk11 might be too old on some Travis agents. -jdk: - - openjdk12 - - oraclejdk17 - -matrix: - fast_finish: true - allow_failures: - - jdk: openjdk-ea - -cache: - directories: - - $HOME/.m2 diff --git a/README.md b/README.md index 8cf1360e9..042b94aae 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Apache HttpComponents Client Welcome to the HttpClient component of the Apache HttpComponents project. -[![Build Status](https://travis-ci.com/apache/httpcomponents-client.svg?branch=master)](https://travis-ci.com/apache/httpcomponents-client) +[![GitHub Actions Status](https://github.com/apache/httpcomponents-client/workflows/Java%20CI/badge.svg)](https://github.com/apache/httpcomponents-client/actions) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.httpcomponents.client5/httpclient5/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.httpcomponents.client5/httpclient5) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) @@ -37,7 +37,7 @@ For building from source instructions please refer to [BUILDING.txt](./BUILDING. Dependencies ------------ -HttpClient main module requires Java 7 compatible runtime and +HttpClient main module requires Java 8 compatible runtime and depends on the following external libraries: * [Apache HttpComponents HttpCore](https://github.com/apache/httpcomponents-core) diff --git a/pom.xml b/pom.xml index b4b317044..b4ba5f27d 100644 --- a/pom.xml +++ b/pom.xml @@ -210,6 +210,7 @@ + clean verify maven-jar-plugin