apache / apache/maven-surefire
[SUREFIRE-2018] Tests not excluded when dependency label used within the plugin
- Dominant language
- Java
- Stars
- 461
- Forks
- 588
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 19
Description
**[Pucheng Yang](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER285498)** opened **[SUREFIRE-2018](https://issues.apache.org/jira/browse/SUREFIRE-2018?redirect=false)** and commented
Hi there, I found a strange issue for me, not sure if it is a bug or I did something wrong. Could you help me take a look? thanks.
I am trying to exclude a test when working on a open source project (https://github.com/trinodb/trino/blob/master/core/trino-main/pom.xml#L489), here is the original plugin definition
```java
org.apache.maven.plugins
maven-surefire-plugin
org.apache.maven.surefire
surefire-junit-platform
${dep.plugin.surefire.version}
org.apache.maven.surefire
surefire-testng
${dep.plugin.surefire.version}
```
to exclude certain tests, this is what I do
```java
org.apache.maven.plugins
maven-surefire-plugin
org.apache.maven.surefire
surefire-junit-platform
${dep.plugin.surefire.version}
org.apache.maven.surefire
surefire-testng
${dep.plugin.surefire.version}
**/TestFileSingleStreamSpillerFactory.java
```
However, when I run maven test, this test is not excluded. I tried commented out the dependency part, and I can exclude it.
```java
org.apache.maven.plugins
maven-surefire-plugin
**/TestFileSingleStreamSpillerFactory.java
```
I wonder did I miss something? thanks.
---
**Affects:** 3.0.0-M5
Contributor guide
Research direction
Reproduce the behavior with the Maven Surefire plugin configuration shown, first using both surefire-junit-platform and surefire-testng dependencies and then without them. Trace how the plugin dependencies affect the excludes configuration, using TestFileSingleStreamSpillerFactory.java as the target. Done means the named test is excluded while both provider dependencies remain configured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100