-
Notifications
You must be signed in to change notification settings - Fork 41.7k
Description
We are using Spring Boot 2 in a few projects, and I have noticed that build-info.properties has never changed since the first build of the project and that /actuator/info returns this first build information.
It appears on each run, the bootBuildInfo always shows UP-TO-DATE and doesn't re-run.
I can reproduce this with simple starter project:
- Used start.spring.io to generate sample project. Spring Boot 2.0.0.RC2, gradle-4.5.1-all.zip, Java 8
- Add
springBoot { buildInfo() }to build.gradle. I placed this after "sourceCompatibility" line. - Run gradlew bootBuildInfo, observe build/resources/main/META-INF/build-info.properties is version 0.0.1-SNAPSHOT
- Update build.gradle
version='1.0.0-SNAPSHOT' - Run gradlew bootBuildInfo, it will say task is "UP-TO-DATE". Observe build-info.properties has NOT changed in build.version or build.time values.
Specific to my use case: as I am behind firewall I modified build.gradle repositories and wrapper properties to point to Maven (Nexus) repo mirror and gradle-4.5.1-all.zip on my network. These are mirror of public files so I don't expect this step to matter.
Our project uses 2.0.0.RC1 but the example project above exhibited same behavior with RC1 or RC2.
Workarounds: delete build-info.properties, such as via clean task