bili san

Greenhorn
+ Follow
since Nov 15, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by bili san

Hi Martijn

You are correct most CI wont fail the build unless i tell them so , and thats whats my goal is , if strict coding standards are not met i would like to fail the build, the check goal will print the reason on maven console that the reason of failure is the existence of checkstyle errors and the reports will give the developer additional hint where to look for the checkstyle error. At this point i have accomplished that. But i am curious regarding some more elegant way if there is any how can this be solved as per my last comment
13 years ago
Hi Martijn

Thank you for correcting me how to post properly

For the record i have found a way today how to accomplish the goal i needed, this is my modified pom.xml currently



By running it through the maven in this particular sequence of the phases "clean site package" , i can generate the html reports under path $(build)\target\site and fail the build if there are any checkstyle errors before i execute the unit tests and the rest of the phases.

My question now will be, is there any way how to accomplish this , without adding another profile like the one above (secondary) that will take care for the second execution for the goal check since i cant have 2 executions of the same plug in , under the default profile?
13 years ago
[Avatar]
2010-11-15 21:14:51 CET
Hi all, I have a little problem with configuring maven with checkstyle to generate reports. This is the pom of the project which will be added to some CIS (dont know for sure will it be cruise or hadson or bamboo...)




The problem which i am experiencing is that i have a custom checkstyle configuration , which controls the coding standards and i would like to fail the build if any type of checkstyle error has been found while cross checking it with the "checkstyle.xml". Now if the code of the project contains any type of error the build will fail since i have setted the failOnViolation/Error on true value. The xmls of the plug in are generated properly under target window, but i cant get the html report generated when there are errors. Even when i run the maven with mvn site. Can you please tell me how to get the html report generated even if the build fails because of the checkstyle?
13 years ago