How can I enforce Code Style checks at Maven build-time?
In particular, I'd like to configure both Maven build to use both of these:
How can I configure my Maven build to fail on a Code Style violation?
When you configure your plugin in the pom.xml, you should be able to set the failOnViolation.
Maven check style as a part of the build
Edit:
Ah I see... That I know of, Google Code Style plugin doesn't exist for Maven. I guess I would consider writing your own maven plugin that would do something similar to the checkstyle plugin.
https://maven.apache.org/guides/introduction/introduction-to-plugins.html and https://maven.apache.org/plugins/maven-checkstyle-plugin/source-repository.html
Edit 2:
I guess another option would be to find a way to convert your IntelliJ Codestyle xml into a checkstyle xml and then use the maven-checkstyle-plugin to fail based on those rules.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With