问题描述
我的maven版本是2.2.0 我想要 maven clean 插件,但这是我得到的。我运行了 mvn clean 命令来查看我是否有 maven clean 插件,但该命令找不到用于安装它的资源。
mvn clean
Warning: JAVA_HOME environment variable is not set.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [clean]
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.jar
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.2' from repository central (http://repo1.maven.org/maven2): Failed to transfer file: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.jar. Return code is: 501
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] A required plugin was not found: Plugin Could not be found - check that the goal name is correct: Unable to download the artifact from any repository
Try downloading the file manually from the project website.
Then,install it using the command:
mvn install:install-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-clean-plugin -Dversion=2.2 -Dpackaging=maven-plugin -Dfile=/path/to/file
Alternatively,if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-clean-plugin -Dversion=2.2 -Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.2
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.2
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[INFO] For more information,run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Apr 19 13:52:56 EDT 2021
[INFO] Final Memory: 4M/481M
[INFO] -----------------------------------
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)