eclipse has the possibility to configure code templates per project. These are stored in /.settings/org.eclipse.jdt.ui.prefs
.
/.settings/org.eclip开发者_运维问答se.jdt.ui.prefs
.
The problem with this approach is that every developer needs to specify the same templates for the project, since the pom.xml does not know about templates, and so maven does not write them to the prefs file.
I googled for eclipse maven code template
and found only that the maven-eclipse plugin is capable of defining a code style in eclipse, but i did not find anything about templates.
- Does anybody know of a maven plugin which can solve this?
- Any workarounds or other solutions for this?
I use workspacemechanic to share my eclipse settings between different workspaces. Sharing code templates (Window->Preferences->Java->Editor->Templates) seems to work too. Its an eclipse plugin you have to install, no maven plugin.
精彩评论