You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ds...@apache.org on 2026/06/10 14:56:45 UTC
(nifi-api) branch NIFI-15999 created (now 04b305f)
This is an automated email from the ASF dual-hosted git repository.
dan-s1 pushed a change to branch NIFI-15999
in repository https://gitbox.apache.org/repos/asf/nifi-api.git
at 04b305f NIFI-15999 Added Mockito as an agent to thereby not have Mockito self-attach to enable the inline-mock-maker.
This branch includes the following new commits:
new 04b305f NIFI-15999 Added Mockito as an agent to thereby not have Mockito self-attach to enable the inline-mock-maker.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(nifi-api) 01/01: NIFI-15999 Added Mockito as an agent to thereby not have Mockito self-attach to enable the inline-mock-maker.
Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dan-s1 pushed a commit to branch NIFI-15999
in repository https://gitbox.apache.org/repos/asf/nifi-api.git
commit 04b305f150de8690d15b3cf1a2e75af1e378bbf8
Author: dan-s1 <ds...@gmail.com>
AuthorDate: Wed Jun 10 14:56:19 2026 +0000
NIFI-15999 Added Mockito as an agent to thereby not have Mockito self-attach to enable the inline-mock-maker.
---
pom.xml | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/pom.xml b/pom.xml
index df48eb6..810859b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -85,6 +85,8 @@
<mockito.version>5.23.0</mockito.version>
<pmd.version>7.23.0</pmd.version>
<swagger-annotations.version>2.2.46</swagger-annotations.version>
+ <!-- Define empty argLine to prevent possible Maven crash during Mockito instrumentation -->
+ <argLine/>
</properties>
<dependencyManagement>
@@ -178,6 +180,33 @@
</plugins>
</pluginManagement>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>get-mockito-agent</id>
+ <phase>initialize</phase>
+ <goals>
+ <!--
+ Automatically sets a project property for every direct and transitive dependency that points
+ directly to its resolved artifact file on the local file system
+ -->
+ <goal>properties</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <!-- @{argLine} preserves any arguments generated by other plugins hence
+ ${org.mockito:mockito-core:jar} is resolved after executing maven-dependency-plugin
+ with the properties goal-->
+ <argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>