maven-dependency-plugin icon indicating copy to clipboard operation
maven-dependency-plugin copied to clipboard

[MDEP-651] - allow unpack dependency to configure entries overwrite

Open viqueen opened this issue 6 years ago • 1 comments

https://issues.apache.org/jira/browse/MDEP-651

Extending unpack-dependencies with an option to not overwrite archive entries with duplicate names. The latter can be problematic on case insensitive file systems.

From what I can tell, we always overwrite when unarchiving artifacts , therefore maintaining that to be the default behaviour.

This change will also require the following updates to plexus-archiver https://github.com/codehaus-plexus/plexus-archiver/pull/112

Following this checklist to help us incorporate your contribution quickly and easily:

  • [x] Make sure there is a JIRA issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
  • [x] Each commit in the pull request should have a meaningful subject line and body.
  • [x] Format the pull request title like [MDEP-XXX] - Fixes bug in ApproximateQuantiles, where you replace MDEP-XXX with the appropriate JIRA issue. Best practice is to use the JIRA issue title in the pull request title and in the first line of the commit message.
  • [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • [x] Run mvn clean verify to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • [x] You have run the integration tests successfully (mvn -Prun-its clean verify).

If your pull request is about ~20 lines of code you don't need to sign an Individual Contributor License Agreement if you are unsure please ask on the developers list.

To make clear that you license your contribution under the Apache License Version 2.0, January 2004 you have to acknowledge this by using the following check-box.

viqueen avatar Apr 27 '19 00:04 viqueen

It would be great having a unit/integration tests to check the behaviour...

khmarbaise avatar Mar 29 '20 11:03 khmarbaise

need this one badly. Recent plexus archivers fail hard so we have to use 4.2.2 so that it does not. even without tests its a problem currently if overwrite as documented all over doesn't actually work. what can we do to get this going?

hazendaz avatar May 16 '23 23:05 hazendaz

see https://maven.apache.org/plugins/maven-dependency-plugin/usage.html, the documentation as is states this works, this shows that it does not, proven does not.

plexus archiver 4.2.2 simply states [WARNING] Unable to expand to file .... when it has issue. All newer including 4.7.1 of plexus archiver blow up as file is open (ie windows).

hazendaz avatar May 16 '23 23:05 hazendaz

ok guess this may be different issue. and much worse. 'unpack' isn't respecting this. 'unpack-dependencies' didn't have it. willing to fix here but I doubt this even works. Its simply to test. I unzip chrome to .m2 and then open a copy, crashes everytime as indicated with newer plexus archiver but was a warning previously but really don't want it to re-extract anything.

hazendaz avatar May 16 '23 23:05 hazendaz