Which one is better?
They are different. The maven-eclipse-plugin is very light since it doesn't do anything once the project has been imported in Eclipse but doesn't provide real integration: no bidirectional support, no pom.xml editor, no fancy wizards, no module creation from Eclipse... I personally don't care that much of these features. However, there is one thing that I really need in many projects: support of resources filtering inside the IDE. m2eclipse does that since it embeds Maven.
I am not sure if m2eclipse import a maven project, internally using "maven-eclipse-plugin" to convert into an eclipse project.
No it doesn't, it really add a new Project Nature.
Does maven-eclipse-plugin support WTP 3.1 project settings ? From my experiments, maven-eclipse-plugin can't generate WTP 3 above compatible settings.
The plugin can create WTP R7, 1.0, 1.5 and 2.0 configuration files. WTP 2.0 configuration files are compatible with WTP 3.0 (the structure didn't change).
You can declare the wtpversion
parameter on the command line or in the plugin configuration. Below an example:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.8</version>
<configuration>
<projectNameTemplate>[artifactId]-[version]</projectNameTemplate>
<wtpmanifest>true</wtpmanifest>
<wtpapplicationxml>true</wtpapplicationxml>
<wtpversion>2.0</wtpversion>
<manifest>${basedir}/src/main/resources/META-INF/MANIFEST.MF</manifest>
</configuration>
</plugin>