-
Notifications
You must be signed in to change notification settings - Fork 233
Be defensive about creating directories for files #29
Conversation
Maven 3.4 snapshots are now being published with invalid zip files, where the entries are listed before their parent. So the logic in the Installer is faulty: you have to mkdirs() on all entries to be sure that the directory exists before you write the file.
Arguably we should fix the zip files in 3.4 snapshots as well, but I figure it is better to be defensive here as well. P.S. I didn't add a test because I don't understand well enough the way the Installer needs to be set up. I tested the jar file locally though and it works. |
Kudos to to you @dsyer ! I was just about to create similar MR, but then I bumped into this one. To whom it may concern: please consider to review and merge this change... Maven 3.4 is dropped, but Maven 3.5 is just around the corner (with same issues as described above, at lest in version 3.5.0-beta-1). |
Update: it seems that issue will be solved on Maven side (version 3.5.0):
|
@dsyer you just want commit access? |
I don't think that's necessary, but go ahead if you think it's appropriate. |
It's more if you have fixes and then want to make releases to Maven Central, you'd be able to. Entirely up to you. Would be great to have others who can apply fixes and release. |
I'm happy to be included I guess. What kind of process do you need to decide when to deploy a release? And you probably need to add me to the list of permitted deployers at sonatype for your groupid? |
If you feel like you want to do a release you can :-) Very simple. |
@dsyer I can always do the release process for you. Also when we release this component we need to follow up with a release of the maven plugin. I think a good time to do a release would be soon after Maven 3.5.0 is shipped. Then we can also update that default version.. |
Also .. wdyt @dsyer .. this PR is still valuable and there is no harm .. so should we still merge? I tend to think yes.. |
Totally. Should be merged and released. I've been using a patched version for months now. |
Let me do that this week. Still have to check a couple of other PRs... |
Maven 3.4 snapshots are now being published with invalid
zip files, where the entries are listed before their parent.
So the logic in the Installer is faulty: you have to mkdirs()
on all entries to be sure that the directory exists before you
write the file.