maven-exec-plugin可以使构建失败吗? [英] Can maven-exec-plugin fail the build?
问题描述
我有一个maven执行程序,它将javascript压缩程序作为命令行程序运行,但是,此工具也执行一些jslint检查.
I have a maven execution that runs a javascript compressor as a command line program, however, this tool also does some jslint checks as well.
如果这些jslint检查失败,那么我的构建也应该失败.
If these jslint checks fail so should my build.
这些错误将作为可解析的字符串输出到stdout.
These errors are output as a parseable string to stdout.
如果该Maven插件无法解决此问题,我很乐意使用其他建议的方法.
If this maven plugin cannot solve this problem, I'm happy to use any other suggested.
谢谢.
推荐答案
据我所知, successCodes
).也许您可以围绕此构建一些东西.
To my knowledge, exec:exec
will fail the build if the return code of the executed command is not 0
(or one of the configured successCodes
). Maybe you can build something around this.
或者,看看这些插件,它们都可能因问题而无法构建:
As an alternative, have a look at these plugins, they both can fail a build on problems:
- the Jslint Maven Plugin
- the YUI Compressor Maven Mojo
根据您的确切需求,还有 Maven Javascript插件.
Depending on what you need exactly, there is also the Maven Javascript Plugin.
还可以查看此适用于javascript的Maven插件问题.
这篇关于maven-exec-plugin可以使构建失败吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!