Preventing checkstyle from running in a specific maven submodule

Miquel picture Miquel · Nov 17, 2012 · Viewed 53.4k times · Source

I would like to define a checkstyle run in a pom file, and have it run on all the submodules except certain specified ones.

In other words, I need some sort of <excludes> (which exists but applies to filenames) but which targets modules. Any idea anyone?

Answer

Haim Raman picture Haim Raman · Dec 13, 2012

If you do not want to change your pom.xml you may set the skip to true from command line using the –D option. This was mentioned above as "overridden the skip parameter within an execution". This is quite similar to -Dmaven.test.skip=true usage.

mvn site -Dcheckstyle.skip=true