Ensuring code style in Maven

How can I use code style checks in Maven build-time?

In particular, I would like to configure as a Maven assembly to use both of them:

How can I configure my Maven assembly to fail when violating the code style?

+4
source share
1 answer

When you configure your plugin in pom.xml, you should be able to set failOnViolation.

Maven validation style as part of an assembly

Edit:

... , Google Code Style Maven . , maven, - checkstyle.

https://maven.apache.org/guides/introduction/introduction-to-plugins.html https://maven.apache.org/plugins/maven-checkstyle-plugin/source-repository.html

2:

, , IntelliJ Codestyle xml xstash checkstyle, maven-checkstyle-plugin .

+1

Source: https://habr.com/ru/post/1529047/


All Articles