-
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
Add JavaContainerBuilder to jib core #1347
Conversation
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry if this has been discussed, but for all of these, what if there are duplicate file names?
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Show resolved
Hide resolved
I mean I know what happens (only the last file will win and survive), e.g., .addToClasspath("/loser/messages.properties",
"/winner/messages.properties") so my question is if this is what we really intended, and if so, I think we should explain it in the Javadocs. |
@chanseokoh I can't remember where it was discussed, but I think this is intended behavior, and you are correct that I did forget to mention it in the javadocs. Will fix. |
jib-core/src/main/java/com/google/cloud/tools/jib/api/JavaContainerBuilder.java
Show resolved
Hide resolved
This LGTM - let's follow up this with having our plugins use this new API and make sure everything works the same as before. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since @coollog said LGTM, let's just try. We can iterate if needed.
Fixes #1212.
Adds a
JavaContainerBuilder
class that can be used to build Java-specific containers. Example usage:Potential followup issues:
WarContainerBuilder
for WAR-specific case, or adjustJavaContainerBuilder
to support WARsJavaContainerBuilder
inGradle
/MavenLayerConfigurations