Skip to content

bootBuildInfo does not re-generate build-info.properties (2.0.0.RC2) #12266

@gillius

Description

@gillius

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:

  1. Used start.spring.io to generate sample project. Spring Boot 2.0.0.RC2, gradle-4.5.1-all.zip, Java 8
  2. Add springBoot { buildInfo() } to build.gradle. I placed this after "sourceCompatibility" line.
  3. Run gradlew bootBuildInfo, observe build/resources/main/META-INF/build-info.properties is version 0.0.1-SNAPSHOT
  4. Update build.gradle version='1.0.0-SNAPSHOT'
  5. 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions