为什么“盖镜子的镜子”存储库;错误,尽管在Maven设置中使用HTTPS URL .xml
我的maven版本是3.8.5,以下是maven settings.xml中的镜像config
<mirrors>
<mirror>
<id>aliyun</id>
<mirrorOf>*</mirrorOf>
<name>aliyun</name>
<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
<blocked>true</blocked>
</mirror>
</mirrors>
。但是它设置了true
,然后输出以下错误
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 209, column 21
[ERROR] Non-resolvable import POM: Could not transfer artifact org.springframework.security:spring-security-bom:pom:5.6.3 from/to aliyun (https://maven.aliyun.com/nexus/content/groups/public/): Blocked mirror for repositories: [central (https://repo.maven.apache.org/maven2, default, releases)] @ org.springframework.boot:spring-boot-dependencies:2.6.7, /data/mvn/repository/org/springframework/boot/spring-boot-dependencies/2.6.7/spring-boot-dependencies-2.6.7.pom, line 2751, column 19
[ERROR] Non-resolvable import POM: Could not transfer artifact org.springframework.session:spring-session-bom:pom:2021.1.3 from/to aliyun (https://maven.aliyun.com/nexus/content/groups/public/): Blocked mirror for repositories: [central (https://repo.maven.apache.org/maven2, default, releases)] @ org.springframework.boot:spring-boot-dependencies:2.6.7, /data/mvn/repository/org/springframework/boot/spring-boot-dependencies/2.6.7/spring-boot-dependencies-2.6.7.pom, line 2758, column 19
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.adwetec:adwetec:1.0 (/data/adwetec-user/adwetec-idm/pom.xml) has 2 errors
[ERROR] Non-resolvable import POM: Could not transfer artifact org.springframework.security:spring-security-bom:pom:5.6.3 from/to aliyun (https://maven.aliyun.com/nexus/content/groups/public/): Blocked mirror for repositories: [central (https://repo.maven.apache.org/maven2, default, releases)] @ org.springframework.boot:spring-boot-dependencies:2.6.7, /data/mvn/repository/org/springframework/boot/spring-boot-dependencies/2.6.7/spring-boot-dependencies-2.6.7.pom, line 2751, column 19 -> [Help 2]
[ERROR] Non-resolvable import POM: Could not transfer artifact org.springframework.session:spring-session-bom:pom:2021.1.3 from/to aliyun (https://maven.aliyun.com/nexus/content/groups/public/): Blocked mirror for repositories: [central (https://repo.maven.apache.org/maven2, default, releases)] @ org.springframework.boot:spring-boot-dependencies:2.6.7, /data/mvn/repository/org/springframework/boot/spring-boot-dependencies/2.6.7/spring-boot-dependencies-2.6.7.pom, line 2758, 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
为什么如何设置它?
my maven version is 3.8.5, and the following is mirrors config in maven settings.xml
<mirrors>
<mirror>
<id>aliyun</id>
<mirrorOf>*</mirrorOf>
<name>aliyun</name>
<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
<blocked>true</blocked>
</mirror>
</mirrors>
When blocked
set false
, mvn packge
running ok, but it set true
, then output following error
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 209, column 21
[ERROR] Non-resolvable import POM: Could not transfer artifact org.springframework.security:spring-security-bom:pom:5.6.3 from/to aliyun (https://maven.aliyun.com/nexus/content/groups/public/): Blocked mirror for repositories: [central (https://repo.maven.apache.org/maven2, default, releases)] @ org.springframework.boot:spring-boot-dependencies:2.6.7, /data/mvn/repository/org/springframework/boot/spring-boot-dependencies/2.6.7/spring-boot-dependencies-2.6.7.pom, line 2751, column 19
[ERROR] Non-resolvable import POM: Could not transfer artifact org.springframework.session:spring-session-bom:pom:2021.1.3 from/to aliyun (https://maven.aliyun.com/nexus/content/groups/public/): Blocked mirror for repositories: [central (https://repo.maven.apache.org/maven2, default, releases)] @ org.springframework.boot:spring-boot-dependencies:2.6.7, /data/mvn/repository/org/springframework/boot/spring-boot-dependencies/2.6.7/spring-boot-dependencies-2.6.7.pom, line 2758, column 19
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.adwetec:adwetec:1.0 (/data/adwetec-user/adwetec-idm/pom.xml) has 2 errors
[ERROR] Non-resolvable import POM: Could not transfer artifact org.springframework.security:spring-security-bom:pom:5.6.3 from/to aliyun (https://maven.aliyun.com/nexus/content/groups/public/): Blocked mirror for repositories: [central (https://repo.maven.apache.org/maven2, default, releases)] @ org.springframework.boot:spring-boot-dependencies:2.6.7, /data/mvn/repository/org/springframework/boot/spring-boot-dependencies/2.6.7/spring-boot-dependencies-2.6.7.pom, line 2751, column 19 -> [Help 2]
[ERROR] Non-resolvable import POM: Could not transfer artifact org.springframework.session:spring-session-bom:pom:2021.1.3 from/to aliyun (https://maven.aliyun.com/nexus/content/groups/public/): Blocked mirror for repositories: [central (https://repo.maven.apache.org/maven2, default, releases)] @ org.springframework.boot:spring-boot-dependencies:2.6.7, /data/mvn/repository/org/springframework/boot/spring-boot-dependencies/2.6.7/spring-boot-dependencies-2.6.7.pom, line 2758, 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
WHY?How to set it ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须在
settings.xml
上正确配置中心访问:You have to configure the central access in your
settings.xml
correctly like this: