-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
jib maven plugin 3.0.0 does not impose mainClass property while 3.1.0 does; but I just want to run a jar file #3313
Comments
Sorry for the trouble. It's a regression introduced in 3.1.0. Use 3.1.1, you should be all good. Closing as a dup of #3295. |
BTW, you don't need <image>${docker.image}</image>
- <tags>
- <tag>latest</tag>
- </tags> And I think there will be quite an inefficiency in your built image. Seems like you're copying all the dependency JARs and the app JAR yourself, which is what Jib is already doing. You're duplicate all these JARs. If you have to use a JAR, why don't you just do |
Thanks for correcting this. |
I looked at your The following is not working as you intended and is being ignored. <path>
<from>libs/*.jar</from>
<into>${work.dir}</into>
</path> Therefore, it's also unnecessary to define
At the same time, Jib is copying all the project dependencies to <full.path>${work.dir}/${jar}</full.path>
...
<entrypoint>java,-jar,${full.path} The You can use the
By now, you should have figured it out, but the mode doesn't matter. Jib always copies all the dependency JARs (including |
That explains what I saw in my image; I always have a "libs" layer in my image and I didn't know why. Thanks a lot! Very grateful. |
I have defined this pom.xml:
What I want to do, is to run
java -jar wiremock-xxx.jar
in my image.When the plugin version is 3.0.0, the build and run succeeds. But, when I change to 3.1.0,
mvn jib:dockerBuild
errors out:I know running a jar is not the most recommended way of using jib, but I think jib should allows it. And 3.0.0 to 3.1.0 is a minor version upgrade, there should not be any breaking change.
The text was updated successfully, but these errors were encountered: