If you want, you can replace the "build maven targets" step with a "run shell 
script" step that runs the Maven job the same way your legacy system did.  You 
can also get the "Log Parser Plugin", and feed it the same patterns your legacy 
system uses.

If you just replace the "build maven targets" step with the "run shell script" 
step, then the project will fail if the script returns nonzero and pass 
otherwise.  If you then add the log parsing, an otherwise good build that 
matches a WARNING pattern will be unstable (yellow-ball), and one that matches 
an ERROR pattern will fail (red-ball).

--Rob

From: [email protected] 
[mailto:[email protected]] On Behalf Of Bob Bick
Sent: Wednesday, June 12, 2013 5:31 PM
To: [email protected]
Subject: Maven build failures not detected by Jenkins

Hi,

Background
We are migrating from a legacy build system to Jenkins. So, our build boxes 
already are configured for various tools (e.g. Maven).

Problem
The Jenkins job has an "Invoke top-level Maven targets" build step that 
compiles code, etc. When there are compile errors (or other errors like unit 
tests fail), the build continues to run successfully to completion.

I discovered that the legacy build system would capture STDOUT/STDERR from the 
Maven build step and look for errors; and fail the build based on pattern 
matching.

Question 1
Is there a way in Jenkins to provide similar functionality as our legacy build 
system (i.e. capture Maven's STDOUT/ERR and use pattern matching to detect 
failures)? If not, I guess I'll have to deviate our Jenkins build to leverage a 
different MVN.BAT.

Question 2
How does Jenkins determine  job step success/failure? (Very simple question, 
but my google searches have not helped in figuringthat out)...

Thanks for your time,
Bob

*** *** ***
This message contains information which may be confidential and privileged. 
Unless you are the addressee (or authorized to receive for the addressee), you 
may not use, copy or disclose to anyone the message or any information 
contained in the message. If you have received the message in error,  please 
advise the sender by reply e-mail and delete the message.
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/groups/opt_out.


The information in this message is for the intended recipient(s) only and may 
be the proprietary and/or confidential property of Litle & Co., LLC, and thus 
protected from disclosure. If you are not the intended recipient(s), or an 
employee or agent responsible for delivering this message to the intended 
recipient, you are hereby notified that any use, dissemination, distribution or 
copying of this communication is prohibited. If you have received this 
communication in error, please notify Litle & Co. immediately by replying to 
this message and then promptly deleting it and your reply permanently from your 
computer.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to