Skip to content

Commit 60825e5

Browse files
committed
change plugin version 0.0.1-alpha.7
1 parent 3f28d80 commit 60825e5

File tree

4 files changed

+8
-73
lines changed

4 files changed

+8
-73
lines changed

.github/actions/build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ runs:
7979
COMMERCIAL_SNAPSHOT_REPO_URL: ${{ inputs.commercial-snapshot-repository-url }}
8080
run: |
8181
echo "🔍 Running with debug logging to identify problematic targets..."
82-
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"
82+
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
8383
# - name: Publish
8484
# id: publish
8585
# if: ${{ inputs.publish == 'true' }}

.nx/workflows/agents.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ 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-
export PATH=/usr/lib/jvm/java-17-openjdk-amd64/bin:$PATH
2524
ls -la /usr/lib/jvm/
2625
ls -la /usr/lib/jvm/java-17-openjdk-amd64/bin/
2726
which java
@@ -43,4 +42,6 @@ launch-templates:
4342
'../.cache/Cypress'
4443
base-branch: 'main'
4544
- name: Install Node Modules
46-
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-node-modules/main.yaml'
45+
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-node-modules/main.yaml'
46+
- name: nxProjectGraph
47+
script: ./gradlew nxProjectGraph -PciTestTargetName=ci --info --rerun-tasks

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id "dev.nx.gradle.project-graph" version "0.0.1-alpha.18"
2+
id "dev.nx.gradle.project-graph" version "0.0.1-alpha.7"
33
id "base"
44
id "org.jetbrains.kotlin.jvm" apply false // https://youtrack.jetbrains.com/issue/KT-30276
55
}

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

Lines changed: 3 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import java.util.concurrent.TimeUnit;
2222

2323
import org.junit.jupiter.api.Test;
24-
import org.junit.jupiter.api.condition.EnabledIf;
2524

2625
import org.springframework.util.FileCopyUtils;
2726

@@ -36,85 +35,20 @@
3635
class SampleAntApplicationIT {
3736

3837
@Test
39-
@EnabledIf("isTestEnabled")
4038
void runJar() throws Exception {
41-
File buildDir = new File("build");
42-
System.out.println("Build directory exists: " + buildDir.exists());
43-
System.out.println("Build directory files: " + java.util.Arrays.toString(buildDir.list()));
44-
45-
File antDir = new File("build/ant");
46-
System.out.println("Ant directory exists: " + antDir.exists());
47-
System.out.println("Ant directory files: " + java.util.Arrays.toString(antDir.list()));
48-
4939
File libs = new File("build/ant/libs");
50-
System.out.println("Libs directory exists: " + libs.exists());
51-
System.out.println("Libs directory files: " + java.util.Arrays.toString(libs.list()));
52-
53-
// Look for any JAR files in the libs directory
54-
File[] jarFiles = libs.listFiles((dir, name) -> name.endsWith(".jar"));
55-
System.out.println("JAR files in libs: " + java.util.Arrays.toString(jarFiles));
56-
57-
String jarName = "spring-boot-smoke-test-ant.jar";
58-
if (jarFiles != null && jarFiles.length > 0) {
59-
// Use the first JAR file found
60-
jarName = jarFiles[0].getName();
61-
System.out.println("Using JAR file: " + jarName);
62-
}
63-
64-
ProcessBuilder processBuilder = new ProcessBuilder("java", "-jar", jarName);
65-
// Set PATH to include Java bin directory
66-
java.util.Map<String, String> env = processBuilder.environment();
67-
String currentPath = env.get("PATH");
68-
env.put("PATH", "/usr/lib/jvm/java-17-openjdk-amd64/bin" + ((currentPath != null) ? ":" + currentPath : ""));
40+
String javaExecutable = findJavaExecutable();
41+
ProcessBuilder processBuilder = new ProcessBuilder(javaExecutable, "-jar", "spring-boot-smoke-test-ant.jar");
6942
Process process = processBuilder.directory(libs).start();
7043
process.waitFor(5, TimeUnit.MINUTES);
7144
assertThat(process.exitValue()).isZero();
7245
String output = FileCopyUtils.copyToString(new InputStreamReader(process.getInputStream()));
73-
System.out.println("Application output: '" + output + "'");
7446
assertThat(output).contains("Spring Boot Ant Example");
7547
}
7648

7749
private String findJavaExecutable() {
78-
// Use the same Java executable that's running the current JVM
79-
String javaHome = System.getProperty("java.home");
80-
if (javaHome != null) {
81-
File javaExecutable = new File(javaHome, "bin/java");
82-
if (javaExecutable.exists()) {
83-
return javaExecutable.getAbsolutePath();
84-
}
85-
}
86-
87-
// Fallback to PATH
50+
// Fallback to PATH first in CI environment
8851
return "java";
8952
}
9053

91-
boolean isJavaExecutableAvailable() {
92-
try {
93-
String javaExecutable = findJavaExecutable();
94-
if (!javaExecutable.equals("java")) {
95-
return new File(javaExecutable).exists();
96-
}
97-
// Try to execute java to see if it's available in PATH
98-
ProcessBuilder pb = new ProcessBuilder("java", "-version");
99-
Process process = pb.start();
100-
return process.waitFor() == 0;
101-
}
102-
catch (Exception ex) {
103-
return false;
104-
}
105-
}
106-
107-
boolean isJarAvailable() {
108-
File libs = new File("build/ant/libs");
109-
if (!libs.exists()) {
110-
return false;
111-
}
112-
File[] jarFiles = libs.listFiles((dir, name) -> name.endsWith(".jar"));
113-
return jarFiles != null && jarFiles.length > 0;
114-
}
115-
116-
boolean isTestEnabled() {
117-
return isJavaExecutableAvailable() && isJarAvailable();
118-
}
119-
12054
}

0 commit comments

Comments
 (0)