Creating a Maven web application and integration for Eclipse and IntelliJ IDEs

Posted by

Hi folk

In this tutorial I will show you how you can create a dynamic web project using maven in command line. First of all if you would like to create a web app rapidly then issue the command below, or if you would like to create and browse different type of projects remove the project type and other specifications in the below given command. On Linux, Windows or Mac does not matter launch your terminal/command line app to create our project:

mvn archetype:generate -DgroupId=PROJECTPACKINGNAMEGOESHERE -DartifactId=PROJECTNAMEGOESHERE -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false

As soon as you launch this code the outcome should look like this:

Selection_016

our project is ready and lets convert our project into an Eclipse or IntelliJ project issue the command below but first of all navigate to the project folder first otherwise you will have the errors maven unable to locate the pom.xml file:

Eclipse Integration

mvn eclipse:eclipse -Dwtpversion=2.0

IntelliJ Integration

mvn idea:idea -Dwtpversion=2.0

After the command our project will look and converted to that IDE structure, the below the folder structure since I am an IntelliJ fan the here is my folder output:

Selection_017

Leave a Reply

Your email address will not be published. Required fields are marked *