Fiddling to make Mockito work on modern JVMs.
This commit is contained in:
+30
-7
@@ -22,19 +22,21 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mockito</groupId>
|
<groupId>org.mockito</groupId>
|
||||||
<artifactId>mockito-core</artifactId>
|
<artifactId>mockito-core</artifactId>
|
||||||
<version>3.12.4</version>
|
<version>5.18.0</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</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>
|
<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 />
|
<getdown.host.whitelist />
|
||||||
|
<!-- This is needed for Mockito's agent config shenanigans below. -->
|
||||||
|
<argLine/>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@@ -126,6 +128,27 @@
|
|||||||
<useFile>false</useFile>
|
<useFile>false</useFile>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user