Björn Björn - 19 days ago 5
Java Question

Share formatting rules between netbeans and eclipse java

What is the best way to have a common code (java) formatting when using both Netbeans and Eclipse in a project? I have been searching for a solution but cannot find anything really suitable. I came accross jalopy as a maven plugin but I'm looking for something which is free.

Answer

As you are using Maven you might want to have a look at the Checkstyle plugin. It's integrated with the Netbeans project settings and you have editor support. I don't know about the quality of Eclipse integration, but at least you can enforce the rules you like.