apache / apache/maven-dependency-plugin

[MDEP-481] <destFileName> is getting ignored

Open
#919 4 comments 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

**[Markus Karg](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mkarg)** opened **[MDEP-481](https://issues.apache.org/jira/browse/MDEP-481?redirect=false)** and commented

With the following configuration, the entry \ is getting ignored, but the original name as matched by the \ pattern is used for the destination file name:

```xml

g
a
t
prefix*suffix.ext
name.ext

```

This is problematic in case the exact file name is unknown or irrelevant, e. g. if a file shall be picked by prefix solely, while the suffix (version, classifier, etc.) are irrelevant, as the destFileName would leave out suffix anyways.

As it is the POM author's responsibility to not overwrite files, the default behaviour should not be to ignore \ in case of multiple pattern matches, but the files should simply auto-overwrite each other. Typically the default use case where a POM author would use patterns and destFileName at the same time, anyways is when he knows for sure there is can be only one match.

---

**Affects:** 2.10

1 votes, 5 watchers

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the XML artifactItem configuration with an includes pattern matching multiple files and a destFileName in the Maven Dependency Plugin. Trace the handling of pattern matches and destination naming, then verify that the configured destination is used for every match and that the result matches the requested overwrite behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.