diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index a5be92ae8f..40bebb87a8 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -15,17 +15,78 @@ # specific language governing permissions and limitations # under the License. -name: Java CI +name: Maven CI -on: [ push, pull_request ] +on: + workflow_dispatch: {} + push: + branches: [ main ] + pull_request: + branches: [ main ] jobs: build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up JDK + uses: actions/setup-java@v2.1.0 + with: + java-version: 8 + distribution: adopt-hotspot + + - name: License Check + run: mvn apache-rat:check "-Drat.consoleOutput" + + - name: Build with Maven + run: mvn verify --errors --batch-mode --no-transfer-progress -Pdocs + + build-all: + needs: build strategy: matrix: os: [ ubuntu-latest, windows-latest, macOS-latest ] - java: [ 8, 11, 15, 16-ea ] + java: + # 8 + - version: 8 + dist: adopt-hotspot + - version: 8 + dist: adopt-openj9 + - version: 8 + dist: zulu + # 11 + - version: 11 + dist: adopt-hotspot + - version: 11 + dist: adopt-openj9 + - version: 11 + dist: zulu + # 16 + - version: 16 + dist: adopt-hotspot + - version: 16 + dist: adopt-openj9 + - version: 16 + dist: zulu + exclude: + # was already built + - os: ubuntu-latest + java: + version: 8 + dist: adopt-hotspot + # exclude some builds, because MacOs builds have fewer resources available. + # excludes java 16 on macOS. + - os: macOS-latest + java: + version: 16 + # exclude adopt-hotspot on MacOS. zulu (also hotspot) and OpenJ9 are sufficient. + - os: macOS-latest + java: + dist: adopt-hotspot fail-fast: false runs-on: ${{ matrix.os }} @@ -35,23 +96,21 @@ jobs: uses: actions/checkout@v2 - name: Set up cache for ~./m2/repository - uses: actions/cache@v2.1.3 + uses: actions/cache@v2.1.6 with: - path: ~/.m2/repository + path: | + ~/.m2/repository + !~/.m2/repository/org/apache/shiro 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 + uses: actions/setup-java@v2.1.0 with: - java-version: ${{ matrix.java }} - - - name: License Check - run: mvn apache-rat:check "-Drat.consoleOutput" + java-version: ${{ matrix.java.version }} + distribution: ${{ matrix.java.dist }} - name: Build with Maven run: mvn verify --errors --batch-mode --no-transfer-progress -Pdocs - - diff --git a/pom.xml b/pom.xml index 6246a27c72..2c3c6dab8f 100644 --- a/pom.xml +++ b/pom.xml @@ -81,7 +81,7 @@ - 1.9.4 + 1.9.7.M3 1.9.4 1.4 1.14 @@ -402,7 +402,7 @@ dev.aspectj aspectj-maven-plugin - 1.13.M2 + 1.13.M3 - - - aspectj-compile - - compile - test-compile - - - - - - org.aspectj - aspectjtools - ${aspectj.version} - - org.apache.felix