apache / apache/maven-dependency-plugin
[MDEP-735] excludes* are ignored
- Dominant language
- Java
- Stars
- 175
- Forks
- 196
- Avg merge
- 19h 30m
- Merged PRs (30d)
- 5
Description
**[Fabrice Bacchella](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=fbacchella)** opened **[MDEP-735](https://issues.apache.org/jira/browse/MDEP-735?redirect=false)** and commented
I need to ignore some dependencies in my project when doing dependency:resolve.
But I don't think excludes* settings are used in this goal.
I even try:
> \
> > \org.apache.maven.plugins\
> > \maven-dependency-plugin\
> > \3.1.2\
> > \
> > \jar\
> > \
> > \
It's indeed used, but it fails:
> $ mvn dependency:resolve -X
> [DEBUG] Goal: org.apache.maven.plugins:maven-dependency-plugin:3.1.2:resolve (default-cli)
> ...
> \jar\
> ...
> [ERROR] Failed to execute goal on project jrds-log4j: Could not resolve dependencies for project fr.jrds:jrds-log4j:jar:2021.1: The following artifacts could not be resolved: fr.jrds:jrds-core:jar:2021.1, fr.jrds:jrds-core:jar:tests:2021.1: Could not find artifact fr.jrds:jrds-core:jar:2021.1 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
I download the code for the current release. If I look for excludeTypes in src/test/java, it's used only on classes TestCopyDependenciesMojo.java and TestUnpackDependenciesMojo.java. So I think it's not tested.
---
**Affects:** 3.1.2
1 votes, 3 watchers
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the dependency:resolve goal and compare its handling of excludeTypes with the coverage in src/test/java, especially TestCopyDependenciesMojo.java and TestUnpackDependenciesMojo.java. Trace the reported configuration and add a regression test showing that excluded dependency types are not resolved, then run the relevant Maven tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100