marcosvidolin
4/8/2014 - 1:16 AM

Import Maven Web Project to Eclipse

Import Maven Web Project to Eclipse


# to create a web project using Maven:
mvn archetype:generate -DgroupId={project-packaging} -DartifactId={project-name}
-DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false

# To convert the Maven web project to support Eclipse IDE
mvn eclipse:eclipse -Dwtpversion=2.0

# You want Eclipse web project NOT Eclipse Java project.
# Many users are confused, again, if you just issue mvn eclipse:eclipse, 
# it will only convert the project as Eclipse Java project, add extra -Dwtpversion=2.0
# argument to make it as Eclipse web project.