-
Notifications
You must be signed in to change notification settings - Fork 402
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
java.util.zip.ZipException: archive is not a ZIP archive #270
Comments
As I run into similar errors with shadowJar, any hint how you solved this? |
Anyone found solution for this? |
Not sure why the original poster has the 'doFirst' block configuring the shadowJar task. That's not needed. Perhaps it is causing an issue. |
Also if someone posts a full stack trace of the error that would help. |
I get a similar error. build.gradle: https://gist.github.com/StefenSharkey/aaf4c82221cfa558060302dfe241d070 |
I get a similar error. The context is for a client and can't be shared. I'm working on trying to reproduce it in a sandbox example. My intuition is that it is related to the size of the deliverable. Any info would be greatly appreciated. UPDATE: in my case, I had been including an in-house, binary artifact as a jar, when in fact it was another format. This was intentional and worked with a simple Gradle application. However, the Shadow plugin (quite rightly) chokes on it. |
@StefenSharkey why are you setting this? - https://gist.github.com/StefenSharkey/aaf4c82221cfa558060302dfe241d070#file-build-gradle-L47 The error seems to imply that that directory doesn't exist yet. |
This error makes shadowJar completely unusable. |
@zilti - if you’ve read this issue, you would see that it was caused by something in the user’s configuration or an issue with a dependency and shadow is doing exactly what it should do. If the file isn’t a Zip but is claiming to be, there’s nothing else it could do but error. If you have more information to add or a reproducible example, please open a new issue so it can be investigated. |
Also affected. Not sure if I should ignore this error or if it means something bad about the JAR file I ship to production 🙈 |
When I try to invoke
./gradlew clean shadowJar
to compile and assemble my jar with all dependencies I'm hitting the errorjava.util.zip.ZipException: archive is not a ZIP archive
as I wrote here.Is this issue related with my dependencies, or my gradle and/or the shadow plugin versions?
Shadow Version
1.2.4
Gradle Version
3.1
Expected Behavior
Build the jar file with all dependencies when hitting
./gradlew clean shadowJar
.Actual Behavior
Getting the error:
java.util.zip.ZipException: archive is not a ZIP archive
Gradle Build Script(s)
Bellow some parts of the my
build.gradle
script that might be relevant:.
.
.
The text was updated successfully, but these errors were encountered: