This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-api.git
The following commit(s) were added to refs/heads/main by this push:
new 0d4d6c6 NIFI-15999 Added Mockito as a Java Agent to avoid
inline-mock-maker warnings (#95)
0d4d6c6 is described below
commit 0d4d6c6ab63179cbb204f1495072d402e186160d
Author: dan-s1 <[email protected]>
AuthorDate: Tue Jul 7 11:23:03 2026 -0400
NIFI-15999 Added Mockito as a Java Agent to avoid inline-mock-maker
warnings (#95)
Signed-off-by: David Handermann <[email protected]>
---
pom.xml | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/pom.xml b/pom.xml
index df48eb6..d76560e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -178,6 +178,38 @@
</plugins>
</pluginManagement>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <!-- Copy mockito-core library to target directory to
avoid warnings in IntelliJ for agent loading -->
+ <execution>
+ <id>copy-mockito-core</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+
<outputDirectory>${project.build.directory}/agents</outputDirectory>
+
<destFileName>mockito-core.jar</destFileName>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <!-- Configure mockito-core as Java Agent to enable
explicit attachment to processes -->
+
<argLine>-javaagent:${settings.localRepository}/org/mockito/mockito-core/${mockito.version}/mockito-core-${mockito.version}.jar</argLine>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>