Can maven-exec-plugin fail the build?

早过忘川 提交于 2019-12-04 02:50:54

问题


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.

If these jslint checks fail so should my build.

These errors are output as a parseable string to stdout.

If this maven plugin cannot solve this problem, I'm happy to use any other suggested.

Thanks.


回答1:


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

Depending on what you need exactly, there is also the Maven Javascript Plugin.

And also have a look at this Maven plugins for javascript question.



来源:https://stackoverflow.com/questions/3480162/can-maven-exec-plugin-fail-the-build

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!