Skip to content

Commit 7ba2cfe

Browse files
Fix argLine configuration for modules without JaCoCo
Use property-based argLine configuration to support both modules with and without JaCoCo coverage. This prevents fork VM crashes in xapi-server sample. Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com>
1 parent 235fbfe commit 7ba2cfe

1 file changed

Lines changed: 2 additions & 20 deletions

File tree

pom.xml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
<lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
2525
<jjwt.version>0.13.0</jjwt.version>
2626
<okhttp.version>5.3.2</okhttp.version>
27+
<!-- Default argLine for surefire/failsafe - JaCoCo will prepend to this -->
28+
<argLine>-XX:+EnableDynamicAgentLoading --enable-native-access=ALL-UNNAMED --add-opens java.base/sun.misc=ALL-UNNAMED</argLine>
2729
</properties>
2830
<organization>
2931
<name>Berry Cloud Ltd</name>
@@ -101,29 +103,9 @@
101103
</dependency>
102104
</dependencies>
103105
</plugin>
104-
<plugin>
105-
<groupId>org.apache.maven.plugins</groupId>
106-
<artifactId>maven-surefire-plugin</artifactId>
107-
<configuration>
108-
<argLine>
109-
@{argLine}
110-
-XX:+EnableDynamicAgentLoading
111-
--enable-native-access=ALL-UNNAMED
112-
--add-opens java.base/sun.misc=ALL-UNNAMED
113-
</argLine>
114-
</configuration>
115-
</plugin>
116106
<plugin>
117107
<groupId>org.apache.maven.plugins</groupId>
118108
<artifactId>maven-failsafe-plugin</artifactId>
119-
<configuration>
120-
<argLine>
121-
@{argLine}
122-
-XX:+EnableDynamicAgentLoading
123-
--enable-native-access=ALL-UNNAMED
124-
--add-opens java.base/sun.misc=ALL-UNNAMED
125-
</argLine>
126-
</configuration>
127109
<executions>
128110
<execution>
129111
<goals>

0 commit comments

Comments
 (0)