[[integrating-with-actuator]]
== Integrating with Actuator


[[integrating-with-actuator-build-info]]
=== Generating build information

Spring Boot Actuator's `info` endpoint automatically  publishes information about your
build in the presence of a `META-INF/build-info.properties` file. A
{build-info-javadoc}[`BuildInfo`] task is provided to generate this file. The easiest way
to use the task is via the plugin's DSL:

[source,groovy,indent=0,subs="verbatim"]
----
include::../gradle/integrating-with-actuator/build-info-basic.gradle[tags=build-info]
----

This will configure a {build-info-javadoc}[`BuildInfo`] task named `bootBuildInfo` and, if
it exists, make the Java plugin's `classes` task depend upon it. The task's destination
directory will be `META-INF` in the output directory of the main source set's resources
(typically `build/resources/main`).

By default, the generated build information is derived from the project:

|===
| Property | Default value

| `build.artifact`
| The base name of the `bootJar` or `bootWar` task, or `unspecified` if no such task
  exists

| `build.group`
| The group of the project

| `build.name`
| The name of the project

| `build.version`
| The version of the project

|===

The properties can be customized using the DSL:

[source,groovy,indent=0,subs="verbatim"]
----
include::../gradle/integrating-with-actuator/build-info-custom-values.gradle[tags=custom-values]
----

Additional properties can also be added to the build information:

[source,groovy,indent=0,subs="verbatim"]
----
include::../gradle/integrating-with-actuator/build-info-additional.gradle[tags=additional]
----
