We use a different profile for development, and a different profile for the CI. The latter is more strict in the manner of Checkstyle rules. My question is: how can i easily *turn off executing some of the rules in the development profile*? One possible solution is just using `configLocation` property in the `maven-checkstyle-plugin`, and adding the different configs in two locations:
<profile> <id>CI</id> <build> <plugins> <plugin> <artifactId>maven-checkstyle-plugin</artifactId> <configuration> <configLocation>ci-checks.xml</configLocation> </configuration> </plugin> </plugins> </build> </profile> <profile> <id>development</id> <build> <plugins> <plugin> <artifactId>maven-checkstyle-plugin</artifactId> <configuration> <configLocation>dev-checks.xml</configLocation> </configuration> </plugin> </plugins> </build> </profile> However this leads to the duplication of the check file. Is there a way to dynamically skip parts of the file? **Edit**: my motivation is that we run the Checkstyle rules when developing in Eclipse, in the incremental compilation (every time when a file is saved) and also when compiling from Maven command line. This is very convenient, but there are some rules which take a [long time][1], and that makes this kind of development impossible, so i want to turn them off. Question copied from [here][2]. [1]: http://github.com/checkstyle/checkstyle/issues/1064 [2]: http://stackoverflow.com/questions/30691673/do-not-run-some-checkstyle-rules-in-a-specific-maven-profile -- View this message in context: http://maven.40175.n5.nabble.com/Do-not-run-some-Checkstyle-rules-in-a-specific-Maven-profile-tp5836995.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org