You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've started using the spotless maven plugin to ensure all code is formatted correctly and has the right license header. If anything is not spotless, it'll cause a build failure.
If spotless notices something is amiss, it can also fix it with a single mvn spotless:apply.
So far I'm loving it, since regardless of what editor I use, I get consistent formatting.
The paths to the codestyle files and license header is configurable. To ensure consistent paths in multi-module maven projects, I set the root.basedir property in each sub-project:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I've started using the spotless maven plugin to ensure all code is formatted correctly and has the right license header. If anything is not spotless, it'll cause a build failure.
If spotless notices something is amiss, it can also fix it with a single
mvn spotless:apply
.So far I'm loving it, since regardless of what editor I use, I get consistent formatting.
The maven plugin is configured in the pom:
The paths to the codestyle files and license header is configurable. To ensure consistent paths in multi-module maven projects, I set the
root.basedir
property in each sub-project:But it is also possible to make a separate maven project for those files.
Example code-style: FROST-Client-Dynamic
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions