GH-1035 - Prevent dynamic agent attachment warnings caused by Mockito.
Prior to this commit, running our tests caused the following warning because Mockito was dynamically self-attaching to the running JVM: Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build what is described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/Mockito.html#0.3 We now follow the advice in the provided link and set up our build accordingly. $ Conflicts: $ spring-modulith-apt/pom.xml
This commit is contained in:
14
pom.xml
14
pom.xml
@@ -496,6 +496,18 @@ limitations under the License.
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>properties</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
@@ -504,6 +516,8 @@ limitations under the License.
|
||||
<excludes>
|
||||
<exclude />
|
||||
</excludes>
|
||||
<!-- To avoid warnings of Mockito dynamically attaching an agent -->
|
||||
<argLine>-javaagent:${org.mockito:mockito-core:jar}</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
|
||||
@@ -50,6 +50,25 @@
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>properties</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<!-- To avoid warnings of Mockito dynamically attaching an agent -->
|
||||
<argLine>-javaagent:${org.mockito:mockito-core:jar}</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user