Thanks @gayanw, you gave me some good inspiration here
However I also wanted to format other files than .java files, so I went for another plugin (still using OpenMRSFormatter.xml though) and I bound it to the compile phase so that the formatting always happens for whoever builds the module, which should always happen prior to making a PR.
I just did a formatting commit on ‘Attachments’ here. Let’s see how this goes with upcoming PRs…
Cc @oslynn