断网环境开发spring boot报错
断网环境开发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配置:
包的具体存放地址:
看网上说要在eclipse下进行Maven - Update project,但试过没用
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
配置都是对的,是我有些pom或jar没有存在,去将别人的maven库全部拉过来就可以了。
mvn install 就行了吧