apache / apache/maven-dependency-plugin

[MDEP-480] There should be an option to prevent files overwrite for unpack-dependencies and unpack

Open
#917 4 comments 0 reactions 0 assignees View on GitHub
enhancement priority:major
Dominant language
Java
Stars
175
Forks
196
Avg merge
19h 30m
Merged PRs (30d)
5

Description

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

There should be an option to prevent file overwrite when extracting files.

This option is very helpful when unpack or unpack-dependencies happens after process-resouce phase.

Currently, there is overwriteRelease, overwriteSnapshot, overwriteIfNewer. But they all work on the artifact scope (that means decide if a whole artifact should overwrite), not files scope (if a file should overwrite an existing file).

---

**Attachments:**
- [patch-maven-dependency-2.9-overwriteFiles.patch](https://issues.apache.org/jira/secure/attachment/12715042/patch-maven-dependency-2.9-overwriteFiles.patch) (_13.39 kB_)

3 votes, 6 watchers

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the unpack and unpack-dependencies extraction entry points and inspect how overwriteRelease, overwriteSnapshot, and overwriteIfNewer are applied. Compare the requested file-level behavior with the attached patch, then verify that an existing extracted file is preserved when the new option disables overwriting.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, tooling
Issue type
Feature
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.