Whilst updating springframework.boot to 3.2.1, I have come across this same issue each time with building the project's Docker container and grabbing all the dependencies:

micrometer-1

To test, I added micrometer-core and micrometer-registry-statds into the pom.xml, without using them explicitly in the project, and come across this issue:

micrometer-2

Comment From: philwebb

Could you please provide the output of mvn dependency:tree. You should see something like this showing that micrometer-observation and micrometer-commons are being pulled in:

[INFO] com.example:demo:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter:jar:3.2.1:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:3.2.1:compile
[INFO] |  |  \- org.springframework:spring-context:jar:6.1.2:compile
[INFO] |  |     +- org.springframework:spring-aop:jar:6.1.2:compile
[INFO] |  |     +- org.springframework:spring-beans:jar:6.1.2:compile
[INFO] |  |     +- org.springframework:spring-expression:jar:6.1.2:compile
[INFO] |  |     \- io.micrometer:micrometer-observation:jar:1.12.1:compile
[INFO] |  |        \- io.micrometer:micrometer-commons:jar:1.12.1:compile
[INFO] |  +- org.springframework.boot:spring-boot-autoconfigure:jar:3.2.1:compile

Comment From: clocke3

Update on my situation: I was able to fix it. It looks like when updating, it exposed a weird bug onto a dependency called spring-boot-actuator in my file. This dependency pulls in micrometer-core transitively. Luckily this project wasn't using it, so I took it out and the build error disappeared.

Comment From: bclozel

I'm not sure this makes sense for me. Maybe micrometer artifacts are corrupted in your local repository? org.springframework.boot:spring-boot-starter-actuator can be a very useful dependency for production purposes.

I'm going to close this right now as the situation is resolved, but we can reopen it if you manage to provide some information that would help us to better understand the problem. Either what Phil requested, or a minimal sample application.

Thanks!