Open parapar opened 3 years ago
Do you have a sample reproducer project we can try out? Does it only happen on Jenkins or also on some other CI(CircleCI/Github Action etc)?
We will appreciate any help in understanding the process that the plugin follows to build the jar in order to identify the cause of this problem
The JKube plugins are not involved in the packaging of the jar, they however select a Jar to be added to the container image (in case you are using generators).
My only guess is that your jar file is repackaged after the container image is built or that a wrong jar is selected by JKube, I can't see any other explanation for this situation.
As Rohan points out, some way to reproduce this issue would be extremely helpful.
After some deeper research, we found that the maven-frontend-plugin (used to package together React and Java apps) was not generating the artifacts soon enough to be copied in the JAR. So we bound that plugin to an earlier phase of the maven lifecycle, which fixed the problem.
Thanks for your help.
Great you could fix it, thx for sharing!
BTW, I usually bind those tasks to the generate-resources
phase, did you use something else? was this phase causing trouble?
As we started the project from an existing example, the yarn build generation and the copy of the resources were bound to later phases (package
and validate
respectively). We are now binding the yarn build generation to the generate-resources
phase and copying the resources in the prepare-package
phase.
Closing this issue as it seems the problem was fixed.
Description
Info
mvn -v
) : 3.8.1