Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to fail a build when new warnings are introduced

We are working on some old java project. The code has many warnings but i want to avoid introducing new ones. is there a way to do it with maven, bamboo. we don't have rights to install new plugins on bamboo (corporation) so maven solution is preferred.

like image 309
piotrek Avatar asked Sep 30 '12 16:09

piotrek


1 Answers

Well, I agree there is no plugin that can do this but you can do this in simple steps with java 1.7.

Use processors at compile time to compile your code and maintain warnings generated in a log file. Every time you will trigger build this will kick off and you can compare old log file with new one.

Note: In jdk 1.6 and 1.5 you can use APT tool for the same.

like image 113
Prateek Avatar answered Oct 11 '22 08:10

Prateek