I am trying to integrate CodeNarc with a Maven-based Groovy project. The documentation on the site for the CodeNarc Maven plugin is minimal. The usage aspects I am trying to understand are:
- How to point to the custom rule sets and where in the project to place them?
- How to fail the Jenkins build if any of the rules are violated.
Currently I am able to run CodeNarc using command
mvn codenarc:codenarc
When I add the 'reporting' section to the POM file (as described at http://www.mojohaus.org/codenarc-maven-plugin/usage.html) and run
mvn site
no CodeNarc report is generated. I get this warning
[WARNING] No URL defined for the project - decoration links will not be resolved
but it is not clear where it is related to CodeNarc.
What is the proper way of using CodeNarc with Maven?