The Maven’s command to create a java project in eclipse.
mvn eclipse:eclipse
The Maven’s command to create a Dynamic Web Project in eclipse.
mvn eclipse:eclipse -Dwtpversion=1.5
P.S Make sure the pom.xml , packaging is “war”, else the “-Dwtpversion” command will fail.
<project ...> <packaging>war</packaging> ... </project>
P.S If you hit Unsupported WTP version: 1.5. This plugin currently supports only the following versions: 1.0 R7 error, please visit solution here
P.S If you want to convert existing java project to a web project in eclipse, you can convert it by modify the .project file. Please access my previous article to understand how do to it
How to convert Java Project to Web Project in Eclipse
Reference
More about maven eclipse:eclipse command, please visit
http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html
More about maven -Dwtpversion=1.5 command, please visit
http://maven.apache.org/plugins/maven-eclipse-plugin/wtp.html



Nice tutorials, I was wondering if you have some nice tutrial on Webservices.
thanks for the suggestion, will write some web services in future
Very useful info!
Any idea why generated classpath in the .classpath file does not include “src/main/java” and “src/test/java”?
In other words, it seems like the generated .classpath file does not include the 2 lines below:
Maven should be include those folders in Eclipse project .classpath, if your folder is follow Maven’s folder structure, Would you mind yo send me your project, in order to further study on it.