使用jenkins从gitlab上拉项目并使用maven进行构建(demo在ide测试正常运行)结果build失败,进入到jenkins容器中手动maven报同样的错误
错误信息:
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format
[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:
解决办法:
在项目pom.xml文件中的
<defaultGoal>compile</defaultGoal>
参考:链接