Skip to content

Commit

Permalink
- fixed section on surefire tests (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgangemi authored Oct 8, 2024
1 parent 1184b33 commit 36d3abf
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,21 @@ Add the following to the downstream maven `pom.xml`. Activation occurs alongside
#### Surefire Tests

Mockito, Byte Buddy and others need to be explicitly added as a java agent for instrumentation. Use
the `maven-dependency-plugin` to grab it's jar location and add it to the `argLine`.
the `maven-dependency-plugin` to grab it's jar location and configure the `argLine` property.

```xml

<properties>
<argLine>-javaagent:${org.mockito:mockito-core:jar} -javaagent:${net.bytebuddy:byte-buddy-agent:jar}</argLine>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar}
-javaagent:${net.bytebuddy:byte-buddy-agent:jar}
</argLine>
</configuration>
</plugin>
</plugins>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
</plugins>
</build>
```

Expand Down

0 comments on commit 36d3abf

Please sign in to comment.