Non-resolvable import POM Failure to find
The version 2.0.0.M6 isn't located in the repo http://repo.maven.apache.org/maven2. If you wan't to use this version you have to use the maven repo http://repo.spring.io/milestone. So add it to your POM file:
<repositories>
<repository>
<id>spring-milestone-repo</id>
<url>http://repo.spring.io/milestone/</url>
</repository>
</repositories>
I would recommend you to use the latest release version of spring-boot (1.5.8.RELEASE), not a milestone version. I don't know how your POM looks like, but you can define spring boot in your POM in different ways:
1. Using the Spring Boot parent POM
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.8.RELEASE</version>
</parent>
Then you can add the dependencies you wish to use e.g.:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
See: https://spring.io/guides/gs/spring-boot/
2. Declare Spring-Boot in Dependency-Management
If you already using an own parent POM, you could also import the spring boot dependency management in your POM:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.5.8.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Same as in variant #1 you can declare afterwards the dependencies of spring boot you wish to use.
ip696
Updated on August 27, 2020Comments
-
ip696 over 3 years
I experimented with spring boot like module in parent pom and now I get error
[ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Non-resolvable import POM: Failure to find org.springframework.boot:spring-boot-dependencies:pom:2.0.0.M6 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ line 30, column 19 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project mydomain.project:main-project:1.0-SNAPSHOT (D:\gitProjects\main-server\sources\pom.xml) has 1 error [ERROR] Non-resolvable import POM: Failure to find org.springframework.boot:spring-boot-dependencies:pom:2.0.0.M6 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ line 30, column 19 -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
I tried delete myproject in
.m2
local repoI have maven project with 2 modules(simple java and spring boot). I extract parent from spring boot to main pom like dependensyManagment and set paren to spring boot - main project. After that I get this error
I revert changes and all works fine. The step by step I faunt point when all crush
- I add this to main pom
<dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>2.0.0.M6</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
- in spring boot I change this
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.0.M6</version> <relativePath/> <!-- lookup parent from repository --> </parent>
to this:
<parent> <artifactId>main-project</artifactId> <groupId>main.project</groupId> <version>1.0-SNAPSHOT</version> </parent>
-
ip696 over 6 yearsthat's why I have a mistake. if I do so. how to solve it?
-
ph1l over 6 yearshave you tried to use the latest release version 1.5.8.RELEASE? How did you import spring boot? With the parent pom declaration in your pom?
-
ip696 over 6 yearsYes work. I was thinking of trying it. but what about the version 2.0.0.M6
-
ph1l over 6 yearsThe version 2.0.0.M6 isn't located in the repo repo.maven.apache.org/maven2. If you wan't to use this version you have to use the maven repo repo.spring.io/milestone
-
Florian Albrecht over 6 years@P.VAN I think you should explain how to add a repository to a POM (just add it to your example).
-
Alex78191 about 6 yearsWhy not install the version of
spring-boot-starter-web
?