Skip to content

Commit 4a2f46f

Browse files
committed
use java in the path
1 parent bb27336 commit 4a2f46f

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

.github/actions/build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ runs:
8383
COMMERCIAL_SNAPSHOT_REPO_URL: ${{ inputs.commercial-snapshot-repository-url }}
8484
run: |
8585
echo "🔍 Running with debug logging to identify problematic targets..."
86-
node debug-nx-targets.js "NX_BATCH_MODE=true NX_CLOUD_DEREFERENCE_SYMLINKS=true NX_VERBOSE_LOGGING=true NX_PERF_LOGGING=true NX_CLOUD_NO_TIMEOUTS=true NX_CLOUD_VERBOSE_LOGGING=true npx nx run-many -t build-ci --parallel=32 --batch --outputStyle=stream"
86+
node debug-nx-targets.js "NX_BATCH_MODE=true NX_CLOUD_DEREFERENCE_SYMLINKS=true NX_VERBOSE_LOGGING=true NX_PERF_LOGGING=true NX_CLOUD_NO_TIMEOUTS=true NX_CLOUD_VERBOSE_LOGGING=true npx nx run spring-boot-smoke-test-ant:test --parallel=32 --batch --outputStyle=stream"
8787
# - name: Publish
8888
# id: publish
8989
# if: ${{ inputs.publish == 'true' }}

.nx/workflows/agents.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ launch-templates:
2121
sudo apt install -y openjdk-17-jdk
2222
sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java
2323
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
24+
ls -la /usr/lib/jvm/
25+
ls -la /usr/lib/jvm/java-17-openjdk-amd64/bin/
26+
which java
2427
java -version
2528
- name: Setup gradle
2629
script: ./gradlew wrapper && ./gradlew --stop && ./gradlew clean

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-ant/src/test/java/smoketest/ant/SampleAntApplicationIT.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,7 @@ void runJar() throws Exception {
4747
}
4848

4949
private String findJavaExecutable() {
50-
// First try java.home system property
51-
String javaHome = System.getProperty("java.home");
52-
if (javaHome != null) {
53-
File javaExecutable = new File(javaHome, "bin/java");
54-
if (javaExecutable.exists() && javaExecutable.canExecute()) {
55-
return javaExecutable.getAbsolutePath();
56-
}
57-
}
58-
59-
// Fallback to PATH
50+
// Fallback to PATH first in CI environment
6051
return "java";
6152
}
6253

0 commit comments

Comments
 (0)