Fiddling to make Mockito work on modern JVMs.
This commit is contained in:
+30
-7
@@ -22,19 +22,21 @@
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>3.12.4</version>
|
||||
<version>5.18.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!-- By default, no host whitelist is added to the binary, so it can be used
|
||||
to download and run applications from any server. To create a custom
|
||||
Getdown build that can only talk to whitelisted servers, set this
|
||||
property on the command line, e.g. -Dgetdown.host.whitelist=my.server.com
|
||||
Wildcards can be used (*.mycompany.com) and multiple values can be
|
||||
separated by commas (app1.foo.com,app2.bar.com,app3.baz.com). -->
|
||||
<properties>
|
||||
<!-- By default, no host whitelist is added to the binary, so it can be used
|
||||
to download and run applications from any server. To create a custom
|
||||
Getdown build that can only talk to whitelisted servers, set this
|
||||
property on the command line, e.g. -Dgetdown.host.whitelist=my.server.com
|
||||
Wildcards can be used (*.mycompany.com) and multiple values can be
|
||||
separated by commas (app1.foo.com,app2.bar.com,app3.baz.com). -->
|
||||
<getdown.host.whitelist />
|
||||
<!-- This is needed for Mockito's agent config shenanigans below. -->
|
||||
<argLine/>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
@@ -126,6 +128,27 @@
|
||||
<useFile>false</useFile>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- this is needed to set the property in the below argLine config -->
|
||||
<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>
|
||||
<argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user