Skip to content

Commit b07f806

Browse files
committed
Fix CI: support Windows and macOS in build workflow
- Use macos-15-intel for stable Java 8 support with setup-java@v1 - Move -DskipTests and -Dmaven.javadoc.skip to MAVEN_OPTS to bypass PowerShell arg parsing on Windows - Add macOS JAVA_HOME fix step for Contents/Home subdirectory Assisted-by: Claude Code
1 parent f58d677 commit b07f806

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/maven.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,26 @@ on:
66
jobs:
77
build:
88
runs-on: ${{ matrix.os }}
9+
env:
10+
MAVEN_OPTS: "-DskipTests=true -Dmaven.javadoc.skip=true"
911
steps:
1012
- uses: actions/checkout@v1
1113
- name: Set up JDK 1.8
1214
uses: actions/setup-java@v1
1315
with:
1416
java-version: 1.8
17+
- name: Fix JAVA_HOME on macOS
18+
if: runner.os == 'macOS'
19+
run: |
20+
if [ -d "$JAVA_HOME/Contents/Home" ]; then
21+
echo "JAVA_HOME=$JAVA_HOME/Contents/Home" >> $GITHUB_ENV
22+
fi
1523
- name: Build with Maven
16-
run: mvn clean package -DskipTests=true -Dmaven.javadoc.skip=true -B -V
24+
run: mvn clean package -B -V
1725
strategy:
1826
matrix:
1927
os:
2028
- ubuntu-latest
2129
- windows-latest
22-
- macos-latest
30+
- macos-15-intel
2331
fail-fast: false

0 commit comments

Comments
 (0)