解决Alibaba Cloud View打包上传的错误:No goals have been specified for this build
作者:互联网
错误日志如下:
No goals have been specified for this build. You must specify a valid lifecycle
phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:
<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are:
validate, initialize, generate-sources, process-sources, generate-resources,
process-resources, compile, process-classes, generate-test-sources, process-test
-sources, generate-test-resources, process-test-resources, test-compile, process
-test-classes, test, prepare-package, package, pre-integration-test, integration
-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-
clean, pre-site, site, post-site, site-deploy.
解决方法:pom.xml 文件中 <build> 标签要加配置:
<defaultGoal>compile</defaultGoal>
问题解析:
原因:No goals have been specified for this build.【尚未为此生成指定任何目标】
解析:在maven中,如果build中没有指定defaultGoal的值,默认【缺省】是install
也就是说,直接去安装了,但是项目本身还未编译过,因此报错
标签:No,process,site,been,Alibaba,sources,build,test,generate 来源: https://blog.csdn.net/weixin_42675423/article/details/122311004