jibBuildTar is wrongly UP-TO-DATE
See original GitHub issueEnvironment:
- Jib version: 3.2.1
- Build tool: Gradle
- OS: MacOS, M1
Description of the issue:
The jibBuildTar
is UP-TO-DATE although the compileJava
task is not.
Expected behavior:
- Changes to the code will cause the
jibBuildTar
to not be UP-TO-DATE
Steps to reproduce:
- Change code
- ./gradlew jibBuildTar
- Change code again
- ./gradlew jibBuildTar => UP-TO-DATE
build.gradle.kts
plugins {
java
id("com.google.cloud.tools.jib")
}
jib {
from {
image = "openjdk:11-jre-slim"
}
}
settings.gradle.kts
rootProject.name = "jib-reproducer"
pluginManagement {
plugins {
id("com.google.cloud.tools.jib") version "3.2.1"
}
}
Log output:
Run 1:
> Task :compileJava
Caching disabled for task ':compileJava' because:
Build cache is disabled
Task ':compileJava' is not up-to-date because:
Output property 'destinationDirectory' file /Users/yannick/IdeaProjects/jib-r?producer/build/classes/java/main has been removed.
Output property 'destinationDirectory' file /Users/yannick/IdeaProjects/jib-r?producer/build/classes/java/main/org has been removed.
Output property 'destinationDirectory' file /Users/yannick/IdeaProjects/jib-r?producer/build/classes/java/main/org/test has been removed.
The input changes require a full rebuild for incremental task ':compileJava'.
Full recompilation is required because no incremental change information is available. This is usually caused by clean builds or changing compiler arguments.
Compiling with toolchain '/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home'.
Compiling with JDK Java compiler API.
Class dependency analysis for incremental compilation took 0.0 secs.
Created classpath snapshot for incremental compilation in 0.0 secs.
:compileJava (Thread[Execution worker for ':',5,main]) completed. Took 0.036 secs.
:processResources (Thread[Execution worker for ':',5,main]) started.
> Task :processResources NO-SOURCE
Skipping task ':processResources' as it has no source files and no previous output files.
:processResources (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.
:classes (Thread[Execution worker for ':',5,main]) started.
> Task :classes
Skipping task ':classes' as it has no actions.
:classes (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.
:jibBuildTar (Thread[Execution worker for ':',5,main]) started.
> Task :jibBuildTar
Caching disabled for task ':jibBuildTar' because:
Build cache is disabled
Task ':jibBuildTar' is not up-to-date because:
Implementation of input property 'jib.from.platforms.$0' has changed for task ':jibBuildTar'
Value of input property 'jib.from.platforms.$0.architecture' has changed for task ':jibBuildTar'
Tagging image with generated image reference jib-reproducer:latest. If you'd like to specify a different tag, you can set the jib.to.image parameter in your build.gradle, or use the --image=<MY IMAGE> commandline flag.
Searching for main class... Add a 'mainClass' configuration to 'jib' to improve build speed.
Could not find a valid main class from 'jar' task; looking into all class files to infer main class.
Run 2:
> Task :compileJava
Caching disabled for task ':compileJava' because:
Build cache is disabled
Task ':compileJava' is not up-to-date because:
Input property 'stableSources' file /Users/yannick/IdeaProjects/jib-r?producer/src/main/java/org/test/Main.java has changed.
Created classpath snapshot for incremental compilation in 0.0 secs.
Compiling with toolchain '/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home'.
Compiling with JDK Java compiler API.
Incremental compilation of 1 classes completed in 0.009 secs.
Class dependency analysis for incremental compilation took 0.0 secs.
:compileJava (Thread[Execution worker for ':',5,main]) completed. Took 0.015 secs.
:processResources (Thread[Execution worker for ':',5,main]) started.
> Task :processResources NO-SOURCE
Skipping task ':processResources' as it has no source files and no previous output files.
:processResources (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.
:classes (Thread[Execution worker for ':',5,main]) started.
> Task :classes
Skipping task ':classes' as it has no actions.
:classes (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.
:jibBuildTar (Thread[Execution worker for ':',5,main]) started.
> Task :jibBuildTar UP-TO-DATE
Caching disabled for task ':jibBuildTar' because:
Build cache is disabled
Skipping task ':jibBuildTar' as it is up-to-date.
:jibBuildTar (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:6 (5 by maintainers)
Top Results From Across the Web
google/jib - Gitter
Gradle: Fixed an issue with jibBuildTar where UP-TO-DATE checks were incorrect. Maven: Fixed an issue where decyrpting Maven settings settings.xml wholesale ...
Read more >After jibBuildTar, what command to use to load to AWS ECR?
Is there an AWS CLI command to simply load my image tar to AWS? (I do not have docker on my computer at...
Read more >Spring Boot Application을 Docker Image로 생성하기 - 3. jib ...
What went wrong: Execution failed for task ':jib'. ... launching layer pushers BUILD SUCCESSFUL in 1m 21s 3 actionable tasks: 1 executed, 2...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, looks like this is an easily reproducible bug.
classes
is a lifecycle task (https://docs.gradle.org/current/userguide/more_about_tasks.html#sec:lifecycle_tasks) and never executes, it only “combines” tasks (in this casecompileJava
andprocessResources
).Yes, see this line: