断网环境开发spring boot报错

发布于 2022-09-11 23:39:55 字数 2960 浏览 28 评论 0

断网环境开发spring boot报错

报错如下:

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.springframework.boot:spring-boot-starter-parent:[unknown-version]: Failure to find org.springframework.boot:spring-boot-dependencies:pom:2.2.1.RELEASE in file://D:\mavenRepository was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ org.springframework.boot:spring-boot-starter-parent:[unknown-version], D:\mavenRepository\org\springframework\boot\spring-boot-starter-parent\2.2.1.RELEASE\spring-boot-starter-parent-2.2.1.RELEASE.pom, line 3, column 11
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.example:demo:0.0.1-SNAPSHOT (F:\代码\demo\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.springframework.boot:spring-boot-starter-parent:[unknown-version]: Failure to find org.springframework.boot:spring-boot-dependencies:pom:2.2.1.RELEASE in file://D:\mavenRepository was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ org.springframework.boot:spring-boot-starter-parent:[unknown-version], D:\mavenRepository\org\springframework\boot\spring-boot-strter-parent\2.2.1.RELEASE\spring-boot-starter-parent-2.2.1.RELEASE.pom, line 3, column 11 -> [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

pom.xml:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.2.1.RELEASE</version>
    <relativePath /> <!-- lookup parent from repository -->
</parent>

Maven的setting.xml:

<localRepository>D:\mavenRepository</localRepository>

<mirror>
    <mirrors>
        <id>central</id>
        <name>central</name>
        <!-- 将镜像地址设置为本地maven地址 -->
        <url>file://D:\mavenRepository</url>
        <mirrorOf>*</mirrorOf>
    </mirror>
<mirrors>

Eclipse配置:
20191122091023.png

包的具体存放地址:
20191122100525.png

看网上说要在eclipse下进行Maven - Update project,但试过没用

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

最笨的告白 2022-09-18 23:39:55

配置都是对的,是我有些pom或jar没有存在,去将别人的maven库全部拉过来就可以了。

半仙 2022-09-18 23:39:55

mvn install 就行了吧

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文