Jeff Storey
Jeff Storey

Reputation: 57212

eclipse checkstyle custom checks with maven

I've written some custom checkstyle checks and stored them in a jar to use with the maven checkstyle plugin. I've used this same jar for for the eclipse checkstyle plugin. If I need to update the custom checks, it's easy in maven (just update the version in the pom). To update the plugin, I need to manually replace that plugin file in eclipse. Is there a way to automatically keep these 2 files in sync?

Upvotes: 2

Views: 440

Answers (1)

Diego Sergnese
Diego Sergnese

Reputation: 340

You should add a maven-eclipse-plugin and add the checkstyle builder and checkstyle nature with custom configuration that indicates which checks to use.
Since you already have the custom checks inside a jar, you have to add a dependency to that jar inside the maven-eclipse-plugin.

It's better explained here

Upvotes: 1

Related Questions