-
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
Check if bootWar/war tasks are enabled #2096
Comments
This seems like the right thing to do, but out of curiosity: why are you disabling the bootwar task? |
@loosebazooka The project I'm trying to use with Jib is https:/cloudfoundry/uaa, specifically the I'm not sure why bootWar is disabled, but I believe it's because the app is transitioning to a spring boot app from a spring XML one. Here's my PR for the changes I made cloudfoundry/uaa#1129 |
Hey @slowr, asking for help, since you've recently modified our code to use |
I don't think it is possible to get the enabled state without creating the task. I asked the Gradle community and this was the answer I got back:
|
Can we depend on both as task dependencies and query the correct config data later? |
Ah, yeah, haven't thought about it. I think it can be the best compromise. That is, we configure Jib runs to depend on both war and bootWar tasks if they are available. |
@mattysweeps I realized the reproducible steps you wrote aren't really correct, so let me check if we are on the same page.
AFAIK, when you apply 'org.springframework.boot' to a WAR project (i.e., a project where the War plugin is applied), it automatically creates the |
@chanseokoh Ah, I see. I believe you are correct. That's what I see in the I'll update the issue description |
@mattysweeps we just released 1.8.0 with the fix. |
Environment:
Description of the issue:
When a project enables the war task but disables the bootWar task, Jib incorrectly chooses the bootWar task to depend on, instead of the war task.
Expected behavior:
Jib should depend on enabled tasks only.
Steps to reproduce:
bootWar { enabled = false }
andwar { enabled = true }
in build.gradleLog output:
Additional Information:
jib/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/JibPlugin.java
Line 167 in 4d8efc9
jib/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/TaskCommon.java
Line 49 in 4d8efc9
The text was updated successfully, but these errors were encountered: