Configure Eclipse Formatter with m2e

808 views Asked by At

is there any existing m2e-extension to configure Eclipse Formatter when importing a Maven project into eclipse? We are using custom checkstyle rules and m2eclipse configures the Eclipse-CS-plugin for us. But in addition I want the Eclipse Formatter to be configured as well...

1

There are 1 answers

0
James Kennard On

This Eclipse plugin may be of use (https://github.com/SciSysUK/m2eclipse-maveneclipse).

One thing you can do with it is copy files around, for example copy the prefs files for the formatter into the Eclipse .settings folder. It isn't perfect but it does the job (I would be really interested in a better/alternative way of achieving this).

There is an example here: https://github.com/philwebb/springfaces/blob/master/springfaces/pom.xml. Note you can also use a URL so you can host those files somewhere