Spring Boot Actuator's GitInfoContributor is consuming git.properties file from libraries.

Comment From: wilkinsona

Thanks for the suggestion but I don't think it's possible to differentiate between a git.properties that we can be certain belongs to the application rather than from a library. For example, we can't assume that the application will be using BOOT-INF/lib for libraries and BOOT-INF/classes for application code as it may not be packaged as a fat jar.

You can use the spring.info.git.location property to override the default location to one that is specific to your application.

Comment From: breun

I encountered this issue after Arrow libraries got transitively included. I've asked the Arrow project if they are willing to omit git.properties in future releases: https://issues.apache.org/jira/browse/ARROW-16825

For now I guess we'll apply a workaround by letting git-commit-id-plugin generate the file in an alternative location and letting Spring Boot read the information from that alternative location.

Comment From: philwebb

@breun Another option for you might be to set spring.info.git.location to a different filename.

Comment From: breun

@philwebb That is what I meant with 'letting Spring Boot read the information from that alternative location'. 😄