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

update setup-jdk / maven action. #301

Merged
merged 2 commits into from
Jun 25, 2021
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
83 changes: 71 additions & 12 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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 }}
Expand All @@ -35,23 +96,21 @@ jobs:
uses: actions/checkout@v2

- name: Set up cache for ~./m2/repository
uses: actions/[email protected].3
uses: actions/[email protected].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


20 changes: 18 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<!-- Compile 3rd party dependencies: -->
<!-- Don't change this version without also changing the shiro-aspect and shiro-features
modules' OSGi metadata: -->
<aspectj.version>1.9.4</aspectj.version>
<aspectj.version>1.9.7.M3</aspectj.version>
<commons.beanutils.version>1.9.4</commons.beanutils.version>
<commons.cli.version>1.4</commons.cli.version>
<commons.codec.version>1.14</commons.codec.version>
Expand Down Expand Up @@ -402,7 +402,7 @@
<plugin>
<groupId>dev.aspectj</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.13.M2</version>
<version>1.13.M3</version>
<!-- Using a fork, until such time that the aspect-maven-plugin updates to support JDK 11 - https://github.com/mojohaus/aspectj-maven-plugin/pull/45
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
Expand All @@ -414,6 +414,22 @@
<complianceLevel>${jdk.version}</complianceLevel>
<showWeaveInfo>true</showWeaveInfo>
</configuration>
<executions>
<execution>
<id>aspectj-compile</id>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
Expand Down
16 changes: 0 additions & 16 deletions support/aspectj/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,6 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
-->
<executions>
<execution>
<id>aspectj-compile</id>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
Expand Down