apache / apache/maven-surefire
[SUREFIRE-2235] Manage of junit-vintage-engine is inconsistent
- Dominant language
- Java
- Stars
- 461
- Forks
- 588
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 19
Description
**[Slawomir Jaranowski](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=slawekjaranowski)** opened **[SUREFIRE-2235](https://issues.apache.org/jira/browse/SUREFIRE-2235?redirect=false)** and commented
We have such situation
```
if junit-platform-engine present on plugin dependencies - nothing is changed
else
if junit-jupiter-api present and junit-jupiter-engine not preset on test dependencies
then
add junit-jupiter-engine
and
if `junit` present on test dependencies then add junit-vintage-engine
```
`junit-vintage-engine` should be alweys added to runtime dependencies if JUnit 4 is present
In other case when we start moving or create one test with `JUnit5` in module, all old tests in `JUnit4` are silently skipped when we forgot to explicit add `junit-vintage-engine`
artifact `junit-jupiter` has a transitive dependencies to junit-jupiter-engine and junit-platform-engine
but `junit-jupiter-api` has no transitive dependencies
so when we use only `junit-jupiter-api` - `junit-vintage-engine` is added.
---
No further details from [SUREFIRE-2235](https://issues.apache.org/jira/browse/SUREFIRE-2235?redirect=false)
Contributor guide
Research direction
Start by tracing how the Surefire plugin manages JUnit test dependencies, focusing on the conditions that add junit-jupiter-engine and junit-vintage-engine. Check the existing dependency-management tests or test entry points, if present, and verify that junit-vintage-engine is added at runtime whenever JUnit 4 is present without changing the other stated cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100