欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

No goals have been specified for this build. You must specify a valid lifecycle phase or a goal ...

程序员文章站 2022-06-17 18:52:18
...

eclipse打包springboot项目,打成jar包报错。

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.417 s
[INFO] Finished at: 2020-03-20T11:59:00+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:3.1.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:3.1.0: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:3.1.0 from/to Central (http://repo1.maven.org/maven2): Failed to transfer http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/3.1.0/maven-clean-plugin-3.1.0.pom. Error code 501, 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

解决方法: 
删除自己修改的仓库的的插件目录下的所有文件,重新build 
如:maven仓库位置\org\apache\maven\plugins 
删除此目录下的所有文件,然后重新build,如:mvn clean

No goals have been specified for this build. You must specify a valid lifecycle phase or a goal ...

 

另外,阿里最近更新了,不再支持http下载,只支持https,你需要把maven配置中的http://换成https://。

阿里云镜像如下:

<mirror>
<id>alimaven-new</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>https://maven.aliyun.com/repository/central/</url>
</mirror>

 

相关标签: Maven