mirror of
https://github.com/Graylog2/graylog2-server.git
synced 2026-03-13 09:32:21 +08:00
Pull up surefire and failsafe config so all modules and plugins use it (#23478)
This commit is contained in:
@@ -549,55 +549,6 @@
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>test-compile</phase>
|
||||
<goals>
|
||||
<!-- Required to get Mockito's JAR path for the surefire argLine. -->
|
||||
<goal>properties</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<forkCount>1</forkCount>
|
||||
<reuseForks>true</reuseForks>
|
||||
<!-- See: "Explicitly setting up instrumentation for inline mocking (Java 21+)" at
|
||||
https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3 -->
|
||||
<argLine>-javaagent:${org.mockito:mockito-core:jar} -Dio.netty.leakDetectionLevel=paranoid -Djava.awt.headless=true</argLine>
|
||||
<excludes>
|
||||
<exclude>**/*IntegrationTest.java</exclude>
|
||||
<exclude>**/*IT.java</exclude>
|
||||
</excludes>
|
||||
<includes>
|
||||
<include>**/*Spec.class</include>
|
||||
<include>**/*Test.class</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<configuration>
|
||||
<forkCount>1</forkCount>
|
||||
<skip>false</skip>
|
||||
<argLine>-Djava.awt.headless=true</argLine>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>integration-test</goal>
|
||||
<goal>verify</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.mycila</groupId>
|
||||
<artifactId>license-maven-plugin</artifactId>
|
||||
|
||||
38
pom.xml
38
pom.xml
@@ -89,6 +89,12 @@
|
||||
<!-- This property will be overridden during the release to collect all artifacts in a central location. -->
|
||||
<local.repo.path>${project.build.directory}/local-maven-repo</local.repo.path>
|
||||
|
||||
<!-- See: "Explicitly setting up instrumentation for inline mocking (Java 21+)" at
|
||||
https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3
|
||||
We use the "@{}" property syntax to delay property resolution for the argLine config in surefire. -->
|
||||
<common.surefire.args>-javaagent:@{org.mockito:mockito-core:jar} -Dio.netty.leakDetectionLevel=paranoid -Djava.awt.headless=true</common.surefire.args>
|
||||
<common.failsafe.args>-Djava.awt.headless=true</common.failsafe.args>
|
||||
|
||||
<!-- Dependencies -->
|
||||
<opensearch.shaded.version>2.19.3-1</opensearch.shaded.version>
|
||||
<airline.version>3.1.0</airline.version>
|
||||
@@ -715,12 +721,44 @@
|
||||
</pluginManagement>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>test-compile</phase>
|
||||
<goals>
|
||||
<!-- Required to get Mockito's JAR path for the surefire argLine. -->
|
||||
<goal>properties</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<trimStackTrace>false</trimStackTrace>
|
||||
<forkCount>1</forkCount>
|
||||
<reuseForks>true</reuseForks>
|
||||
<argLine>${common.surefire.args}</argLine>
|
||||
<excludes>
|
||||
<exclude>**/*IntegrationTest.java</exclude>
|
||||
<exclude>**/*IT.java</exclude>
|
||||
</excludes>
|
||||
<includes>
|
||||
<include>**/*Spec.class</include>
|
||||
<include>**/*Test.class</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<configuration>
|
||||
<forkCount>1</forkCount>
|
||||
<skip>false</skip>
|
||||
<argLine>${common.failsafe.args}</argLine>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
Reference in New Issue
Block a user