apache / apache/maven-dependency-plugin

[MDEP-800] Setting excludeTransitive in copy-dependencies might result in not copying direct dependencies

Open
#1,306 1 comment 0 reactions 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
175
Forks
196
Avg merge
19h 30m
Merged PRs (30d)
5

Description

**[Oliver Hecker](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=ohecker)** opened **[MDEP-800](https://issues.apache.org/jira/browse/MDEP-800?redirect=false)** and commented

Under certain circumstances setting `excludeTransitive` to `true` in copy-dependencies goal might result in even direct dependencies to by excluded from copying.

The issue seems to be related to the fact that - depending on the setup of the maven project and history of builds -  snapshot dependencies might internally be represented by artifacts with version info containing timestamps. When checking whether a dependency is a direct dependency by using ProjectTransitivityFilter this might result in missing to correctly recognize such a dependency as a direct dependency and thus excluding it from copying.

https://github.com/ohecker/dependency-plugin-issue gives a setup and description to reproduce the issue.

---

**Affects:** 3.3.0

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the copy-dependencies goal and reproduce the case using the linked dependency-plugin-issue setup, focusing on snapshot dependencies whose versions contain timestamps. Read how ProjectTransitivityFilter identifies direct dependencies and verify the behavior against Maven Dependency Plugin 3.3.0. Done means direct dependencies are copied while transitive dependencies remain excluded when excludeTransitive is true.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.