-
Notifications
You must be signed in to change notification settings - Fork 181
[MDEP-651] - allow unpack dependency to configure entries overwrite #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MDEP-651] - allow unpack dependency to configure entries overwrite #13
Conversation
@@ -86,7 +86,7 @@ | |||
* @since 3.1.2 | |||
*/ | |||
@Parameter( property = "mdep.unpack.overwrite", defaultValue = "true" ) | |||
private boolean overwrite; | |||
private boolean overwrite = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already don via the defaultValue
from the annotation above.
It would be great having a unit/integration tests to check the behaviour... |
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? |
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). |
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. |
Adding a comment here to old comments I made. The issue turned out to be the marker file location used by the dependency plugin. Its default sits in target so 'clean' wipes that every time. Moving that to m2 location instead resolved the issue for us where we share a live cache for running jenkins jobs on same boxes. So we no longer get the behaviour we were seeing at that time and nothing needed to change other than moving where the marker directory was located. See https://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html#markersDirectory |
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 codehaus-plexus/plexus-archiver#112
Following this checklist to help us incorporate your
contribution quickly and easily:
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.
[MDEP-XXX] - Fixes bug in ApproximateQuantiles
,where you replace
MDEP-XXX
with the appropriate JIRA issue. Best practiceis to use the JIRA issue title in the pull request title and in the first line of the
commit message.
mvn clean verify
to make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
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.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.