Build step ‘Invoke top-level Maven targets‘ marked build as failure

发布时间:2024年01月10日

[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. 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. -> [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/NoGoalSpecifiedException
Build step ‘Invoke top-level Maven targets’ marked build as failure
Finished: FAILURE

Pre Steps填充内容:

export moduleVer=`java -jar /home/jenkins/jk_home/deployHistory/aliImg.jar ci ce next`
echo "新版本=$moduleVer"
echo "$moduleVer" > impl/impl-ofce/ver.txt
sed -i "s/artifactId>.*<version>.*<\/version>/artifactId><version>${moduleVer}<\/version>/" impl/impl-ce/pom.xml

cd common;mvn install;cd ..;
cd api;mvn install;cd ..;
cd tool;mvn install;cd ..;
cd impl;mvn install;cd ..;
mvn compiler:compile;
mvn install;

并且Post Steps选择:
Run only if build succeeds
在这里插入图片描述

再次build就可以成功了

文章来源:https://blog.csdn.net/yzhui61283454/article/details/135474490
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。