-
Notifications
You must be signed in to change notification settings - Fork 877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to ignore frontend execution error (non-zero exit code) #850
Comments
Here is the pull request: |
I forget to mention that my pull request just log a message (INFO level) "There are ignored errors during task: " followed by the error message (but no stack trace) in case of any exception during the execution unit. |
I suggest that you solve this in node.js land. It might be useful if you ever switch build systems (to Gradle maybe?) Check this stackoverflow answer: https://stackoverflow.com/questions/30341113/npm-scripts-ignore-errors and the exitzero package, then instead of the |
Thanks for your reply. I can understand your point, the thing is that I'm running a multi-module project and the yarn "outdated" task (or npm outaded which has the same behavior) is located in the parent project of the module. So your solution implies that any sub-module which has JS to build will have to implement this custom script in its package.json which is not very convenient. I understand that is really specific to my needs but this behavior of yarn and npm outdated task make them unusable in practical with your plugin. So if you don't wan't to add this feature I probably will just drop the functionality as it's just a (very convenient) help for maintainers in my case. |
Just a side note, my first try was to set "arguments" to Do you thing it's possible to find a solution in that direction (without adding any more option) ? Thanks again for your time |
The normal solution is to do |
I'm facing the same kind of issue. We configured the plugin to ignore errors during test execution like this:
The reason is we want the build to continue further and we feed Jenkins (and Sonar) with the test reports afterwards. Thanks to this configuration, the maven plugin doesn't throw any exception when A stacktrace in the logs is often the indication of something bad with the build itself and something we should worry about. However, in this case, the non-zero return code is "expected" and I would not expect such stacktrace but (may be) only an indication that the command "seems" to have failed. Moreover, the stacktrace doesn't have any value in troubleshooting the reason why the command failed: it always reports the same information (non-zero return code). I understand your point about "this issue must be solved on the JS side" (with something like My feeling is that:
@eirslett What do you think ? |
Also facing the same issue. @eirslett Could you reconsider the open PR #851 ? EDIT:
|
Ironically enough, I'm here because I'm facing the exact opposite problem : I want the build to fail if my |
Hi,
First thanks for this awesome plugin :)
State:
I currently use it with yarn to build some JS project and I want to check existence of outdated libraries during build BUT I don't want the build to fail if there are (because it's not always a possibility to update to the latest version)
My problem is that "yarn outdated" command as well as "npm outdated" return a non-zero exit status if there is any outdated library inside my package.json.
So if I add the following execution part in my pom.xml, it break the build if any outaded library is found:
What I wish:
I wan't to be able to add an option into an execution part to ignore non-zero exit like that:
Workaround found so far:
After looking into the plugin code I found that I can do as follow:
<phase>test</phase>
into the execution block<testFailureIgnore>true</testFailureIgnore>
in configuration blockBut this is very ugly because it log an error "There are test failures." which is not accurate at all and print an ugly non-sense stack trace in the middle of the build log.
Suggestion:
I have made a pull request (link to come) which add an available option
<ignoreErrors>true</ignoreErrors>
(false by default) for the configuration block.I indicate in the javadoc that this option is NOT RECOMMENDED as well as
testFailureIgnore
option.If you have any better solution I'm open to any suggestion and have some time to work on it if it requires any further development.
Thanks
Vincent Migot
The text was updated successfully, but these errors were encountered: