From e32ac39fafb8c3afdbf5fe1775e6027bb708e344 Mon Sep 17 00:00:00 2001 From: Kevin Nguyen Date: Wed, 29 Jul 2026 23:21:55 +0700 Subject: [PATCH] =?UTF-8?q?CI:=20install=20Maven=20=E2=80=94=20setup-java?= =?UTF-8?q?=20provides=20the=20JDK=20only?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First CI run failed at 'Build and test' with exit code 127 (command not found): actions/setup-java@v4 provisions a JDK but not Maven, and the runner image has no mvn on PATH. The sibling lms/alms workflow apt-installs both; this workflow switched to setup-java for JDK 25 (the image's default-jdk is too old for maven.compiler.release=25) and dropped the maven install with it. Adds an explicit Maven install with Apache Maven 3.9.16 (2bdd9fddda4b155ebf8000e807eb73fd829a51d5) Maven home: /Users/appbuilder/Tool/apache-maven-3.9.16 Java version: 25.0.2, vendor: Oracle Corporation, runtime: /Users/appbuilder/Tool/jdk-25.0.2.jdk/Contents/Home Default locale: en_VN, platform encoding: UTF-8 OS name: "mac os x", version: "26.5.1", arch: "aarch64", family: "mac" so the log proves which JDK it resolved — JAVA_HOME from setup-java must win over the JRE apt drags in. --- .gitea/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 6dbb20f..d52cd46 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -23,6 +23,14 @@ jobs: java-version: '25' cache: maven + # setup-java provisions the JDK only — it does NOT install Maven, and the runner image has + # no mvn on PATH (a bare `mvn` exits 127). Install it separately. apt pulls a default JRE as + # a dependency; JAVA_HOME from setup-java still wins, which the version check below proves. + - name: Install Maven + run: | + apt-get update && apt-get install -y --no-install-recommends maven + mvn -version + - name: Build and test working-directory: bridged # This IS the mock-socket surface CB-503 asks for: the pom's `default-excludes` profile