apache / apache/maven-surefire
[SUREFIRE-1334] Issue a warning in case argLine is set in conjunction with forkCount=0
- Dominant language
- Java
- Stars
- 461
- Forks
- 588
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 19
Description
**[Sebastian Kirsch](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sebastiankirsch)** opened **[SUREFIRE-1334](https://issues.apache.org/jira/browse/SUREFIRE-1334?redirect=false)** and commented
I just spend some considerable amount of time figuring out why JaCoCo wouldn't work for a Maven project. The reason is that the JaCoCo Maven plugin sets the `argLine` property with a `javaagent` which causes the coverage to be generated and reported - but with `forkCount` being set to `0`, the `argLine` parameter has no effect.
Now hindsight is 20/20, but I think it would be helpful if surefire would simply report a warning in case the `argLine` property is set, but will not have an effect.
I assume the same is true for the `systemProperties`, `systemPropertiesFile`, `systemPropertyVariables`, and maybe others.
---
**Affects:** 2.18.1
Contributor guide
Research direction
Start by tracing how the Maven Surefire plugin handles argLine together with forkCount=0, then compare the behavior of systemProperties, systemPropertiesFile, and systemPropertyVariables. Confirm the expected warning behavior against the reported JaCoCo scenario and verify that options with no effect are identified without changing normal forked execution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100