Skip to content

Commit

Permalink
Feature/18 maven documentation fix (#19)
Browse files Browse the repository at this point in the history
* Fix #18 - Need `properties` goal on `maven-dependency-plugin` for `argLine` to work

* Fix #18 - Need `properties` goal on `maven-dependency-plugin` for `argLine` to work
  • Loading branch information
tginsberg authored Sep 21, 2024
1 parent 89102e8 commit 578b6b5
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,23 @@ test {

#### 2. Enable the Java Agent

Add the following `<argLine/>` to your `pom.xml`. This should account for other Java Agents and run after any others
you may have, such as JaCoCo.
In `pom.xml`, add the `properties` goal to `maven-dependency-plugin`, in order to create properties for each dependency.

```xml
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
```

Then add the following `<argLine/>` to `maven-surefire-plugin`, which references the property we just created for
this library. This should account for other Java Agents and run after any others you may have, such as JaCoCo.

```xml
<plugin>
Expand All @@ -93,6 +108,8 @@ you may have, such as JaCoCo.
</plugin>
```

And

## Use Cases - Annotation-based

**A Test that expects `System.exit()` to be called, with any status code:**
Expand Down

0 comments on commit 578b6b5

Please sign in to comment.