idea终端:PS C:\Users\16283\Desktop\springbootc8hzm> mvn clean install [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building springboot-schema 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: http://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/2.2.2.RELEASE/spring-boot-maven-plugin-2.2.2.RELEASE.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.207 s [INFO] Finished at: 2023-07-22T20:02:37+08:00 [INFO] Final Memory: 9M/245M [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.springframework.boot:spring-boot-maven-plugin:2.2.2.RELEASE or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.springframew ork.boot:spring-boot-maven-plugin:jar:2.2.2.RELEASE: Could not transfer artifact org.springframework.boot:spring-boot-maven-plugin:pom:2.2.2.RELEASE from/to central (http://repo.maven. apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/2.2.2.RELEASE/spring-boot-maven-plugin-2.2.2.RELEASE. pom. Return code is: 501 , ReasonPhrase:HTTPS Required. -> [Help 1] [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/PluginResolutionException
时间: 2023-08-15 21:10:25 浏览: 140
根据你提供的日志信息,问题仍然是由于无法解析插件导致的失败。错误信息与之前相同,指示 Maven 无法从远程仓库下载插件的 POM 文件,并且要求使用 HTTPS 协议。
请尝试按照以下步骤解决问题:
1. 打开 Maven 的配置文件 `settings.xml`。你可以使用命令 `mvn help:effective-settings` 来查找 Maven 的配置文件位置。
2. 在 `<mirrors>` 标签内添加以下内容:
```xml
<mirror>
<id>central-https</id>
<url>https://repo.maven.apache.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
```
3. 保存文件并重新运行 `mvn clean install` 命令。
如果问题仍然存在,你可以尝试使用本地仓库代替远程仓库来解决依赖问题。在 pom.xml 文件中添加以下内容:
```xml
<repositories>
<repository>
<id>maven-central</id>
<name>Maven Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</repository>
</repositories>
```
然后重新运行 `mvn clean install` 命令。
希望这些解决方法能够帮助你解决问题!如果还有其他疑问,请随时告诉我。
阅读全文