It's extremely unlikely or even impossible for dependencies that have the same name to have their jar not included in the image.
Steps to reproduce:
Use jib to build an image for a project that has two dependencies of the same name for which the size of their jar is also the same.
Inspect the image and see that only one of the jars is included in the image.
Additional Information:
We have seen this happen in our project - we started getting ClassNotFoundExceptions inside of a container for a class that should be available and I tracked it down to two dependencies having the same name and same size of the jar file causing one of them to not be included in the image anymore.
I'm willing to provide a PR changing the file name differentiator to use a sequence number or hash of the file contents to resolve this issue. Please let me know if such PR would be considered before I put in the effort for it to be rejected straight away.
Environment:
Description of the issue:
It's likely that one of the dependencies that have the same name will not have their jar included in the image because the size of the jar is used as a file name differentiator for such dependencies.
Expected behavior:
It's extremely unlikely or even impossible for dependencies that have the same name to have their jar not included in the image.
Steps to reproduce:
Additional Information:
We have seen this happen in our project - we started getting
ClassNotFoundException
s inside of a container for a class that should be available and I tracked it down to two dependencies having the same name and same size of the jar file causing one of them to not be included in the image anymore.I'm willing to provide a PR changing the file name differentiator to use a sequence number or hash of the file contents to resolve this issue. Please let me know if such PR would be considered before I put in the effort for it to be rejected straight away.