How to convert maven java project to IntelliJ Idea project

We have learned that how to create a simple java project in maven and also how to convert it to support eclipse IDE.Sometimes developers environment consist of IntelliJ IDE instead of eclipse. So, lets learn about converting it to support IntelliJ also.

Ads by Google

Using an example to demonstrate is always a good way. So, lets see an example:

1) Create sample maven project

mvn archetype:generate -DgroupId=com.howtodoinjava -DartifactId=intelliJDemo
-DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

2) Generate ant script from pom.xml

cd intelliJDemo
mvn idea:idea

3) Above command will download the project plugins for IntelliJ. And, above command will also create the project file (.ipr), module file (.iml) and workspace file (.iws).

maven_intellij

Happy Learning !!

Reference: http://maven.apache.org/plugins/maven-idea-plugin/index.html

Ads by Google

Note:- In comment box, please put your code inside [java] ... [/java] OR [xml] ... [/xml] tags otherwise it may not appear as intended.

Leave a Reply

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


× three = 24

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>