Make sure that you have maven installed and environment variable set on your computer.
Open command prompt/terminal and give the following command.
mvn archetype:generate -DgroupId=com.test-app -DartifactId=test-app -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
This will create a project with archetype: maven-archetype-webapp
Import in your IDE:
- Create new project from existing source
- Browser the project created from Maven
- Select Import project from external model: Maven
- Give Next, Next, Next
- Deploy and run the app on the tomcat to test.
- Similarly eclipse users can import by File > import > existing Maven Project
- Next, Next, Next
- Deploy and run the Project on Tomcat to test.