使用maven构建Java项目时出错
错误插件org.apache.maven.plugins:maven-clean-plugin:2.4.1或其依赖项无法解决:无法读取org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1:的工件描述符,无法将工件org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1从/传输到中心(http://repo.maven.apache.org/maven2):未能传输文件:http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom。返回代码是: 501,ReasonPhrase:HTTPS必需。->帮助1
发布于 2020-03-04 14:50:55
由于maven存储库不允许在http构建上加载工件,因为无法为我们加载干净的插件,所以该解决方案将pluginRepository和httpS url添加到主pom文件中。
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>https://stackoverflow.com/questions/60528723
复制相似问题