IntelliJ + Maven

Hi guys,

I'm new to IntelliJ. Just trialling it at the moment (IntelliJ IDEA 7) but looking good so far!

What i want to understand better is how the Maven-2 plugin works. Is there any documentation on how it's used.

I have some basic questions such as:

Do i have to create and maintain my pom.xml manually? Where should it go in my project? etc

Any replies would be very much appreciated



from my experience, it's good to forget about intellij when creating your poms (even if you edit them from withing intellij, have to love the xml editor !).

Then import the poms using the Project import facility, and voila, no need to create idea projects themselves anymore


Hey Thibaut, thanks for your reply!

So hopefully I got this right. What you're saying is if i want to use maven I'm better off creating a maven archetype project first and then import into IntelliJ?

If that's so could you please clarify which Project import facility you use? I've only seen two options for project imports in the File menu and that was for eclipse and jbuilder project imports.



Use you maven pom.xml file/s as the master/s. To generate intellij files you just use:
mvn idea:idea
If you alter some dependency do a:
mvn idea:module
or even
mvn idea:clean idea:idea

From Intellij you just open the projcet from File / Open Project

Works great (even for eclipse project)



Using the last few EAPs you can open a pom.xml as you would an ipr.

Does that work for you ?


Hi Thibaut,

With Selena all I had to do was create a new project and then select "Import project from external model" option.

The maven functionality seems to work well for simple project structures, although I've started playing with Spring Rich Client build ( and when i execute the install phase against the project i get build failures that i don't get when i run maven from the command line.

I took a closer look and there were things like test-jars not being created where they should've been etc...



Please sign in to leave a comment.