-
Notifications
You must be signed in to change notification settings - Fork 644
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
Invalid or corrupt jarfile #47
Comments
Can you check the jar file within the docker container ? Or could you look below Could you post the assembly descriptor how you put the jar file into the container ? Are you using the maven-shade plugin for creating a fat jar ? Could that be the issue ? Sorry it's a bit fishing in the dark since I didn't had this issue. Might be also because of the size (everything it transmitted via Docker's REST API) but then I would expect the jar in the container to be smaller not larger .... |
this is the content of assembly file:
jar within the container is the same as under target/docker/maven but it is the wrong size then produced by maven. I am using spring-boot-maven-plugin to create an executable jar |
So you say that you have two jar files: One directly below At least it sounds that the process of transmitting the jar to the Docker host is not the problem. Can you switch of the Also instead of directly refering to the jar file you can try the following assembly:
or alternatively instead of using a
|
assemblyDescriptorRef>artifcact</assemblyDescriptorRef Thank you very much for your help |
Good to know ;-) |
…ve-image fabric8io#47 - removeImage Mojo added
Hi again!
My project is making docker image using your plugin. This image is very simple and just contains a jar file and the command to run it. But the problem is that my jar file which were rpoduced by maven and it starts just fine, has different size than the one, copied to docker image. And the one in image cannot be started, image also cannot be run by docker because it says: Error: Invalid or corrupt jarfile maven/dlr-application-0.0.2-SNAPSHOT.jar
This is the size of copied to docker image jar:
-rw-rw-r-- 1 vagrant vagrant 35580429 Nov 18 17:17 dlr-application-0.0.2-SNAPSHOT.jar
And this is the size of the same jar, produced by maven:
-rw-rw-r-- 1 vagrant vagrant 20991343 Nov 18 17:17 dlr-application-0.0.2-SNAPSHOT.jar
so as you can see, first one which is copied by docker-maven-plugin is almost 2 times bigger and does not start.
The text was updated successfully, but these errors were encountered: