-
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
Error build a project with the same module and submodule name #810
Comments
Hi @sergeygalkin , thanks for reporting this issue! It looks like this is a consequence of Jib placing all the dependency JARs in the |
The issue in Gradle is that the dependencies are only resolved with their file path, and not with their We should probably keep the logic for Maven/Gradle the same in terms of generating the filename for the dependency jar in the container image. Therefore, there are a few strategies:
Thoughts? @GoogleContainerTools/java-tools |
The first option would be the simplest and has a merit, but I think retaining the original name outweighs the benefit of the simple implementation here for debugging purposes when something goes wrong. The option 2 seems to work, but I wonder how long the unique ID would be. |
I think with option 3, we could even number further occurrences such that the second one becomes |
With option 2, the unique ID can also just be a counter, so the length would just be log number of jars. |
I've thought about using numbers. I'd still add some special, discernible prefix, like |
Yea, detecting dup shouldn't be too complex since all the dependency jars are processed in the same code loop. |
I dunno, I mean the final
Or in It really seems like the user should not be reusing names. And if they do it's unexpected behavior. I'm curious what the |
The problem is that, the filename of a dependency JAR is basically the artifact ID of its Maven coordinates. For example, you can have multiple dependency JAR files with the same filename. (BTW, one should not include both
What we currently do is to copy those This is OK in WAR, since the group ID is appended.
I think it is very possible that different dependencies may have the same artifact ID, which is OK because they will have different group IDs. |
You're right, I seemed to have missed this. I guess we should solve it. Although I wonder if resolving the jars is deterministic in the build system? Should they be sorted by size? |
Hi @sergeygalkin , we've released |
@coollog A lot of thanks ! great job |
Plugin can't build project with module structure like this
basic
module/basic
module/submodule
Part of
mvn compile -X -pl module/submodule jib:buildTar
Trace output is
workaround is rename
module/basic
The text was updated successfully, but these errors were encountered: