Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bamboo claims my maven build as failed but the build was ok

Thorsten Platz August 9, 2011

Hi,

I've a problem with my maven builds. Bamboo recognizes them as failed but they're successful.

Searching the web led my to this article: http://confluence.atlassian.com/display/BAMBOO/Bamboo+indicates+that+my+Ant+or+Maven+builds+failed,+even+though+they+were+successful

As you can see below, the build meets the definition of successful builds described above.

The article above is for Bamboo v3.2, but I'm running the old v2.2.3 of Bamboo.

These are the last lines of the build logfile:

build	10-Aug-2011 14:02:22	[INFO] de.zdf.cmzwo.cmzwo-zdfportal ...................... SUCCESS [1:57.202s]
build	10-Aug-2011 14:02:22	[INFO] ------------------------------------------------------------------------
build	10-Aug-2011 14:02:22	[INFO] BUILD SUCCESS
build	10-Aug-2011 14:02:22	[INFO] ------------------------------------------------------------------------
build	10-Aug-2011 14:02:22	[INFO] Total time: 3:36.994s
build	10-Aug-2011 14:02:22	[INFO] Finished at: Wed Aug 10 14:02:22 CEST 2011
build	10-Aug-2011 14:02:22	[INFO] Final Memory: 82M/593M
build	10-Aug-2011 14:02:22	[INFO] ------------------------------------------------------------------------
simple	10-Aug-2011 14:02:22	Build process for 'CMZwoelf Continuous Integration - Portal' returned with return code = 0
simple	10-Aug-2011 14:02:22	Parsing test results...
simple	10-Aug-2011 14:02:23	Running post build plugin 'Artifact Copier'
simple	10-Aug-2011 14:02:23	Running post build plugin 'NCover Results Collector'
simple	10-Aug-2011 14:02:23	Running post build plugin 'Clover Results Collector'
simple	10-Aug-2011 14:02:23	Finalising the build...
simple	10-Aug-2011 14:02:23	Stopping timer.
simple	10-Aug-2011 14:02:23	Build CM12CI-PORTAL-66 completed.
simple	10-Aug-2011 14:02:23	Running post build plugin on server 'Build Hanging Detection Configuration'
simple	10-Aug-2011 14:02:23	Running post build plugin on server 'NCover Results Collector'
simple	10-Aug-2011 14:02:23	Running post build plugin on server 'Clover Delta Calculator'

As you can see maven writes "BUILD SUCCESS" and return with 0.

Any ideas what the problem is?

Regards,
Thorsten

5 answers

1 accepted

1 vote
Answer accepted
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 10, 2011

Maven 3 changed the success message from "BUILD SUCCESSFUL" to "BUILD SUCCESS".

Bamboo looks at the message AND the result code to determine the build status because for some Maven versions the result code was unreliable.

Old Bamboo version cannot handle that, I think this was fixed in Bamboo 2.6. If you cannot upgrade, you can try running maven through a wrapper script:

Script content:

/path/to/maven3/mvn "$@" | sed "s/BUILD SUCCESS\b/BUILD SUCCESSFUL/"

Or, switch to Maven 2.

0 votes
Martina Kainberger April 14, 2014

Hi!

I have a similar problem and it only started recently which leads me to assume that some configuration on Bamboo has changed.

To put it into perspective: We are part of a bigger company which hosts Bamboo in-house (or rather on an AWS instance). Our build plans are a mixture of script, maven build and s3 upload tasks.

Up to about 2 weeks ago our builds showed up green, if there were no test errors. For the past two weeks even though no tests are reported as failed and the build log is clean and everything says success, the build shows up red/failed with the message:
"No failed tests found, a possible compilation error occurred."

Then it goes on to list log snippets like this:
SEVERE: Request Failed.
org.jets3t.service.S3ServiceException: S3 Error Message. ...
WARNING: Error Response: GET ...

So I am wondering, if there is any kind of log file parsing happening or any setting that we could change to avoid it reporting on errors that are not actually build errors.

0 votes
Thorsten Platz August 10, 2011

Yes, it's maven 3.

Is this the problem?

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 9, 2011

Verify you have at least 1 successful test. There is a bug so if 0 successful tests -> failure.

0 votes
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 9, 2011

This is Maven 3, right?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events