Skip to content
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

No war content at all in the generated image #4310

Open
Rockflo opened this issue Sep 18, 2024 · 2 comments
Open

No war content at all in the generated image #4310

Rockflo opened this issue Sep 18, 2024 · 2 comments

Comments

@Rockflo
Copy link

Rockflo commented Sep 18, 2024

Hi,
I use jib-maven-plugin for many war/jar projects and find it really useful.
But I came across a case of a war project where it doesn't work and I can't tell why. Everything seems to work as the image is correctly sent to the container registry. But the war content (exploded or not) is totally missing from the image (not even any class file). No log to tell what happened (even with -X and -Djib.serialize=true). The same occurs with another image or with jetty default image. And if I change the final name in the maven-war-plugin configuration (without packaging again), I get as expected an error saying that jib cannot find the war, so I guess jib can find the war and the error occurs later in the build. I use jib-maven-plugin 3.4.3 and maven-war-plugin 3.4.0. But it seemed to be the same with previous versions. Any idea ? How can I get more log otherwise ?
Thanks
Florent

@zhumin8
Copy link
Contributor

zhumin8 commented Sep 20, 2024

Thanks for reaching out. Do you mind providing a minimum reproducible sample so we can better understand your problem?
Otherwise, our readme has a section on war project that might be helplful. And you could also check if your case falls into any of these cases that's not supported yet: #1857

@Rockflo
Copy link
Author

Rockflo commented Sep 24, 2024

Thanks for the reply. I finally found out what was wrong on our project. But I still cannot explain the whole thing.
Our project was created with jhipster 6.10.5 (by cloning https://github.com/jhipster/jhipster-sample-app/tree/v6.10.5 one can get a project quite similar to ours) ... and it turns out that someone had changed the packaging type from jar to war (don't know why). By changing it back to jar everything works fine.

I tried to change the packaging type to war in the jhipster-sample-app but unfortunately it was not enough to reproduce (jib could package the war). There must be something else that has changed (another breaking action or maybe just a dependency update). This could be explored a little further. Unfortunately I won't be able to provide a minimum reproducible sample due to lack of time.

There is surely still work to do on this topic at least to make the log more relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants