[ovirt-devel] disabling maven-checkstyle-plugin

Greg Padgett gpadgett at redhat.com
Wed Sep 9 21:45:41 UTC 2015


On 09/09/2015 05:40 AM, Martin Mucha wrote:
> Hi,
>
> I want to get rid of work style: wait 10 minutes for compilation to finish, read about unused import, fix it and start over.
>
> I'm not that familiar with maven / our setup. Is there a correct way how to do that?

The way I use is to add an option to `make` to disable checkstyle[1], ie:
   make install-dev (options) DEV_EXTRA_BUILD_FLAGS="-Dcheckstyle.skip=1"

I have a little shell script conditionally do this to save myself some typing.

> So far what I do is using altered pom.xml so there's new profile disabling maven-check-style if enabled, and I had to force git to ignore pom.xml changes. This does not seem right.
 >
> Also is there a way how to continue with build from point where it failed, or do I truly need to restart from scratch?

I think there is, but you might need to invoke maven directly.  I've never 
bothered--as long as I don't clean between build attempts, it seems to 
catch up to where it was quickly enough.  If there's one bit of code 
you're iterating over, you can always cd to where that source is and 'mvn 
compile' it until you're ready for a full build.

Hope that helps,
Greg

[1] https://maven.apache.org/plugins/maven-checkstyle-plugin/usage.html

> thanks for advices,
> M.
> _______________________________________________
> Devel mailing list
> Devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel
>




More information about the Devel mailing list