Insoluble POM import Impossibility to find

I experimented with the spring loading module in the parent pom and now I get the 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 removing myproject in .m2local repo

I have a maven project with two modules (plain java and spring loading). I retrieve the parent from spring to load into the main pom, for example dependensyManagment, and set the paren parameter for spring boot-main project. After that I get this error

I am returning the changes and everything is working fine. Step by step, I stop when everything is crushed

  • I add this to the 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>
  1. 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>

:

<parent>
        <artifactId>main-project</artifactId>
        <groupId>main.project</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
+4
source share
1 answer

2.0.0.M6 http://repo.maven.apache.org/maven2. , maven repo http://repo.spring.io/milestone. POM:

<repositories>
    <repository>
        <id>spring-milestone-repo</id>
        <url>http://repo.spring.io/milestone/</url>
    </repository>
</repositories>

spring -boot (1.5.8.RELEASE), . , POM, spring POM -:

1. spring POM

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.8.RELEASE</version>
</parent>

, , :

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
</dependencies>

: https://spring.io/guides/gs/spring-boot/

2. spring -Boot in Dependency-Management

POM, spring 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>

# 1, spring, .

+2

Source: https://habr.com/ru/post/1689228/


All Articles