Skip to content

Commit f7288f3

Browse files
committed
build: move jcstress to opt-in -Pjcstress profile
The jcstress execution was bound to the test phase with <skip>${skipTests}</skip>. The publish pipeline uses -Dmaven.test.skip=true (a different Maven property), which correctly skipped surefire and test compilation but did NOT skip jcstress. jcstress then crashed with an NPE because the annotation-processor- generated META-INF/jcstress/TestList resource had never been built. Move the execution into a <profile id="jcstress"> so it only runs when explicitly requested via -Pjcstress. The exec-maven-plugin is kept in the default build for JMH benchmarks. publish.yml: add -Pjcstress to the Java test job so jcstress still runs at least once per CI build (in the test phase, not in the release/package phase that skips tests). https://claude.ai/code/session_01NHGqtxTLHUXAEzqABvmKnB
1 parent a0b1813 commit f7288f3

2 files changed

Lines changed: 31 additions & 21 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ jobs:
403403
echo "${{ github.workspace }}/core.%e.%p" | sudo tee /proc/sys/kernel/core_pattern
404404
- name: Run tests
405405
run: |
406-
mvn --no-transfer-progress test \
406+
mvn --no-transfer-progress -P jcstress test \
407407
-Dnet.ladenthin.llama.nomic.path=models/${NOMIC_EMBED_MODEL_NAME} \
408408
-Dnet.ladenthin.llama.vision.model=models/${VISION_MODEL_NAME} \
409409
-Dnet.ladenthin.llama.vision.mmproj=models/${VISION_MMPROJ_NAME} \

pom.xml

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -506,26 +506,6 @@ SPDX-License-Identifier: MIT
506506
<mainClass>org.openjdk.jmh.Main</mainClass>
507507
<classpathScope>test</classpathScope>
508508
</configuration>
509-
<executions>
510-
<execution>
511-
<id>jcstress</id>
512-
<phase>test</phase>
513-
<goals><goal>exec</goal></goals>
514-
<configuration>
515-
<skip>${skipTests}</skip>
516-
<executable>${java.home}/bin/java</executable>
517-
<classpathScope>test</classpathScope>
518-
<arguments>
519-
<argument>-classpath</argument>
520-
<classpath/>
521-
<argument>org.openjdk.jcstress.Main</argument>
522-
<argument>-v</argument>
523-
<argument>-m</argument>
524-
<argument>default</argument>
525-
</arguments>
526-
</configuration>
527-
</execution>
528-
</executions>
529509
</plugin>
530510
</plugins>
531511
</build>
@@ -663,5 +643,35 @@ SPDX-License-Identifier: MIT
663643
</plugins>
664644
</build>
665645
</profile>
646+
<profile>
647+
<id>jcstress</id>
648+
<build>
649+
<plugins>
650+
<plugin>
651+
<groupId>org.codehaus.mojo</groupId>
652+
<artifactId>exec-maven-plugin</artifactId>
653+
<executions>
654+
<execution>
655+
<id>jcstress</id>
656+
<phase>test</phase>
657+
<goals><goal>exec</goal></goals>
658+
<configuration>
659+
<executable>${java.home}/bin/java</executable>
660+
<classpathScope>test</classpathScope>
661+
<arguments>
662+
<argument>-classpath</argument>
663+
<classpath/>
664+
<argument>org.openjdk.jcstress.Main</argument>
665+
<argument>-v</argument>
666+
<argument>-m</argument>
667+
<argument>default</argument>
668+
</arguments>
669+
</configuration>
670+
</execution>
671+
</executions>
672+
</plugin>
673+
</plugins>
674+
</build>
675+
</profile>
666676
</profiles>
667677
</project>

0 commit comments

Comments
 (0)