Maven - format code and check-in
Question
I am using Hudson to build my projects periodically. I want Hudson to format my code (using Jalopy) and then check-in the changes to github.com.
I already have Jalopy configured the way I like, I just need to configure the scm plugin to check-in the changes.
Solution
In my humble opinion, this is a strange workflow and you should fix the root cause of a problem, not fix it after the facts.
Let's make toast American style: you burn, I'll scrape. --W. Edwards Deming.
I would thus format the code before committing either using:
- the IDE on save (Eclipse can do this automatically with Save Actions)
- a pre-commit hook (on your local repo?)
- using
jalopy:format
duringprocess-sources
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow