I am getting the following error when I tried to mvn clean install
on this spring project:
[ERROR] Non-resolvable import POM: Could not find artifact io.micrometer:micrometer-bom:pom:2.0.0-M3 in spring-snapshots (https://repo.spring.io/snapshot) @ org.springframework.boot:spring-boot-dependencies:3.0.0-M2, C:\Users\abc
\.m2\repository\org\springframework\boot\spring-boot-dependencies\3.0.0-M2\spring-boot-dependencies-3.0.0-M2.pom, line 2273, column 19
I am using this basic settings file in my .m2
folder:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
</servers>
<mirrors>
</mirrors>
<profiles>
</profiles>
</settings>
Some of the dependencies are downloading fine (see below), but seems that micrometer
is causing an issue.
Downloading from spring-snapshots: https://repo.spring.io/snapshot/org/springframework/session/spring-session-bom/2022.0.0-M1/spring-session-bom-2022.0.0-M1.pom
Downloading from spring-milestones: https://repo.spring.io/milestone/org/springframework/session/spring-session-bom/2022.0.0-M1/spring-session-bom-2022.0.0-M1.pom
Downloaded from spring-milestones: https://repo.spring.io/milestone/org/springframework/session/spring-session-bom/2022.0.0-M1/spring-session-bom-2022.0.0-M1.pom (2.8 kB at 5.2 kB/s)
How can I resolve this issue?
CodePudding user response:
Since Spring Boot 3.0.0-M2 was released, the Micrometer 2.0 release upon which it depends was abandoned and replaced with a backwards-compatible 1.10 release instead. As part of this, to avoid confusion about the latest version, the Micrometer team took the decision to delete the 2.0 artifacts from https://repo.spring.io. An unfortunate consequence of this is that Spring Boot 3.0.0-M2 is no longer usable.
At the time of writing, the latest milestone of Spring Boot 3.0 is 3.0.0-M4. Upgrading to it will resolve your problem. It depends on a Micrometer 1.10 milestone.