-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use BOM for Micrometer dependency examples in reference docs (#5652)
This avoids dynamic versions in dependency declaration examples, and it encourages use of dependency management for consistent, static versions. Also uses the specific version of the docs being built, so it matches the documentation's version. See gh-5093 Co-authored-by: Jonatan Ivanov <[email protected]> Co-authored-by: Tommy Ludwig <[email protected]>
- Loading branch information
1 parent
a0f4911
commit 55f90e2
Showing
7 changed files
with
150 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,29 @@ | ||
[[implementations-installing]] | ||
== Installing | ||
|
||
For Gradle, add the following implementation: | ||
It is recommended to use the BOM provided by Micrometer (or your framework if any), you can see how to configure it xref:../installing.adoc[here]. The examples below assume you are using a BOM. | ||
|
||
=== Gradle | ||
|
||
After the BOM is xref:../installing.adoc[configured], add the following dependency: | ||
|
||
[source,groovy,subs=+attributes] | ||
---- | ||
implementation 'io.micrometer:micrometer-registry-{system}:latest.release' | ||
implementation 'io.micrometer:micrometer-registry-{system}' | ||
---- | ||
|
||
For Maven, add the following dependency: | ||
NOTE: The version is not needed for this dependency since it is defined by the BOM. | ||
|
||
=== Maven | ||
|
||
After the BOM is xref:../installing.adoc[configured], add the following dependency: | ||
|
||
[source,xml,subs=+attributes] | ||
---- | ||
<dependency> | ||
<groupId>io.micrometer</groupId> | ||
<artifactId>micrometer-registry-{system}</artifactId> | ||
<version>${micrometer.version}</version> | ||
</dependency> | ||
---- | ||
|
||
NOTE: The version is not needed for this dependency since it is defined by the BOM. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,29 @@ | ||
[[micrometer-observation-install]] | ||
= Installing | ||
|
||
Micrometer comes with a Bill of Materials (BOM), which is a project that manages all the project versions for consistency. | ||
It is recommended to use the BOM provided by Micrometer (or your framework if any), you can see how to configure it xref:../installing.adoc[here]. The examples below assume you are using a BOM. | ||
|
||
The following example shows the required dependency for Micrometer Observation in Gradle: | ||
== Gradle | ||
|
||
[source,groovy,subs=+attributes] | ||
After the BOM is xref:../installing.adoc[configured], add the following dependency: | ||
|
||
[source,groovy] | ||
---- | ||
implementation platform('io.micrometer:micrometer-bom:latest.release') | ||
implementation 'io.micrometer:micrometer-observation' | ||
---- | ||
|
||
The following example shows the required dependency in Maven: | ||
NOTE: The version is not needed for this dependency since it is defined by the BOM. | ||
|
||
== Maven | ||
|
||
[source,xml,subs=+attributes] | ||
After the BOM is xref:../installing.adoc[configured], add the following dependency: | ||
|
||
[source,xml] | ||
---- | ||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.micrometer</groupId> | ||
<artifactId>micrometer-bom</artifactId> | ||
<version>${micrometer.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.micrometer</groupId> | ||
<artifactId>micrometer-observation</artifactId> | ||
</dependency> | ||
</dependencies> | ||
<dependency> | ||
<groupId>io.micrometer</groupId> | ||
<artifactId>micrometer-observation</artifactId> | ||
</dependency> | ||
---- | ||
|
||
NOTE: The version is not needed for this dependency since it is defined by the BOM. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters