apache / apache/maven

[MNG-7842] Keep using transitive dependencies even if one of the declarations misses a version

Open
#8,742 2 comments 0 reactions 0 assignees View on GitHub
enhancement priority:major
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[Vladimir Sitnikov](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=vladimirsitnikov)** opened **[MNG-7842](https://issues.apache.org/jira/browse/MNG-7842?redirect=false)** and commented

I have a problem that Maven discards **all** transitive dependencies when a single of them misses ``. It breaks workflows, and it is not clear why Maven behaves like that.

I'm using Maven 3.8.6.

Sample:

```xml

4.0.0

org.example
TestBugMaven
1.0-SNAPSHOT


17
17
UTF-8



org.apache.jmeter
ApacheJMeter_core
5.6.1

```

Test: `mvn dependency:tree`

Output:

```
[WARNING] The POM for org.apache.jmeter:ApacheJMeter_core:jar:5.6.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ TestBugMaven ---
[INFO] org.example:TestBugMaven:jar:1.0-SNAPSHOT
[INFO] \- org.apache.jmeter:ApacheJMeter_core:jar:5.6.1:compile
```

Frankly speaking, I do not understand why Maven discards ALL transitive dependencies in case it observes a single one with "missing version".

Note: adding `dependencyManagement` does not seem to fix the case, so it is even more confusing.

The following still discards transitive dependencies:

```xml



com.google.auto.service
auto-service-annotations
compile
1.1.1



org.apache.jmeter
ApacheJMeter_core
5.6.1


```

---

**Remote Links:**
- [GitHub: The POM for org.apache.jmeter:ApacheJMeter_http:jar:5.6.1 is invalid
](https://github.com/apache/jmeter/issues/6041)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.