Files
sailing-analytics/.github/workflows/build-sailing-base-p2.yml
T
Axel Uhl 2550cecea3 Pin Apache Maven to 3.9.11 for Tycho 4.0.x compatibility
The GitHub-hosted ubuntu runner image bumped its default Apache Maven
from 3.9.x to 3.10.0 (image ubuntu24/20261004.327). Tycho 4.0.x requires
the Maven 3.9.x line; under Maven 3.10.0 Tycho's Sisu/Guice component
wiring fails at extension bootstrap with "No implementation for
MavenTargetLocationFactory was bound" while provisioning
DefaultTargetPlatformFactory, breaking the build.

Pin Maven to 3.9.11 via setup-maven in every workflow that runs Maven
(release, build-aws-sdk-p2, build-sailing-base-p2, build-jetty-p2) so the
build no longer depends on whatever Maven the runner image ships. The
action is SHA-pinned consistently (stCarolas/setup-maven v5.1).

Assisted-By: Claude Opus 4.8
2026-10-06 17:33:04 +02:00

86 lines
3.5 KiB
YAML

name: build-sailing-base-p2
on:
push:
branches: [main]
paths:
- 'java/com.sap.sailing.targetplatform.base/**'
workflow_dispatch: {}
jobs:
build-sailing-base-p2:
permissions:
contents: write
checks: write
actions: read
runs-on: 'ubuntu-latest'
steps:
- name: Check out the repository to the runner
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: '500'
- name: Install JDK 8
uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '8'
mvn-toolchain-id: 'JavaSE-1.8'
- name: Install JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
mvn-toolchain-id: 'JavaSE-17'
- name: Pin Apache Maven to 3.9.11
# Tycho 4.0.x requires the Maven 3.9.x line; the GitHub runner image's default
# Maven floats and bumped to 3.10.0, which breaks Tycho's Sisu/Guice component
# wiring. Pin a known-good 3.9.x so the build no longer depends on the runner
# image's default.
uses: stCarolas/setup-maven@12eb41b233df95d49b0c11fc1b5bc8312e5d4ce0 # v5.1
with:
maven-version: 3.9.11
- shell: bash
env: # Or as an environment variable
TMP: /mnt/tmp
JAVA8_HOME: ${{env.JAVA_HOME_8_X64}}
JAVA17_HOME: ${{env.JAVA_HOME_17_X64}}
run: |
configuration/install-gwt-from-fork-releases https://github.com/eclipse-sailing-analytics/gwt-forward-serialization-rpc https://github.com/eclipse-sailing-analytics/gwt-maven-plugin-forward-serialization-rpc 2.12.4 .
cd java/com.sap.sailing.targetplatform.base
mvn clean compile 2>&1 | tee build.log
echo "BUILD_TIME=$(date -u +"%Y%m%dT%H%M%S")" >> "$GITHUB_ENV"
- name: Upload build log
uses: actions/upload-artifact@v4
if: always()
with:
name: build.log
path: build.log
retention-days: 90
- name: Upload p2 site as artifact
uses: actions/upload-artifact@v4
with:
name: aws-sdk-p2
path: java/com.sap.sailing.targetplatform.base/target/repository/**/*
retention-days: 90
- name: SCP artifacts to download.eclipse.org to version-specific folder
uses: appleboy/scp-action@ff85246acaad7bdce478db94a363cd2bf7c90345 # v1
with:
host: projects-storage.eclipse.org
username: ${{ secrets.SCP_USERNAME }}
key: ${{ secrets.SCP_KEY }}
passphrase: ${{ secrets.SCP_PASSPHRASE }}
source: "java/com.sap.sailing.targetplatform.base/target/repository"
target: "/home/data/httpd/download.eclipse.org/sailing-analytics/p2/sailing-${{env.BUILD_TIME}}"
strip_components: 4
rm: true
- name: SCP artifacts to download.eclipse.org to default folder
uses: appleboy/scp-action@ff85246acaad7bdce478db94a363cd2bf7c90345 # v1
with:
host: projects-storage.eclipse.org
username: ${{ secrets.SCP_USERNAME }}
key: ${{ secrets.SCP_KEY }}
passphrase: ${{ secrets.SCP_PASSPHRASE }}
source: "java/com.sap.sailing.targetplatform.base/target/repository"
target: "/home/data/httpd/download.eclipse.org/sailing-analytics/p2/sailing"
strip_components: 4
rm: true