IntelliJ Idea for Maven2 & Spring development

Last week I tried Spring IDE 1.2.6 which is basically a set of plugins to support Spring development in Eclipse. The IDE provides excellent features like autocompletion (on class and property level) and a graphical view of the bean stack.

A big downside is the stabillity. Allthough some colleagues don’t seem to have problems, my Eclipse install started to throw errors (xml parser related it seems) at unpredictable moments.

While browsing arround, looking for a way to solve the problem I discovered that the IntelliJ IDEA (5.0) has build-in spring support. Allthough I’ve always been quite fond of eclipse I decided to give it a go… can’t be a bad thing to know the ‘competition’.

Since the project I’m working on is maven2 based setting up the project for InelliJ development was ultra-easy:

mvn idea:idea

from the project root created the project environment… and after opening the generated project file, I was ready to go!

The first thing I wanted to see was the Spring integration, after installing the IdeaSpring plugin I had to manually copy $IDEA_DOWNLOADED_PLUGINS_DIR/idea-spring-parser.jar to $IDEA_HOME/lib.

After the plugin is installed the project configuration window shows a new icon, which opens the IdeaSpring configuration dialog. In this dialog you can specify which files in your project are Spring configuration files:

Select applicationContext file

If you have done this, you will notice that the Spring autocompletion works for the selected files!

spring autocompletion

Wow, cool…. it works!

Now for the maven2 integration, the plugins I found where mostly maven 1.0 related, so I decided to add maven 2.0 as an external tool:

Maven as external tool

I made a runner for the ‘package’ target, which by default also runs all unit tests. I copied this configuration and added

-Dmaven.test.skip=true

to create a runner which doesn’t run all unit tests.

IntelliJ automatically creates the options to run the created tools in the project context menu (right-mouse) and tools menu:

maven runner

Cool!


0 Responses to “IntelliJ Idea for Maven2 & Spring development”

  1. No Comments

Leave a Reply





About

Welcome to the weblog of Peter Maas. Here you'll find various posts related to stuff I like (like my kids and espresso) and stuff I do (like developing software).

JavaOne 2008 Pictures

Sjoerd op de Sallandse Heuvelrug (en de rug van papa) nice place to park a bike IMG_4556.JPG sea_lion javaone2008 keynote sjoerd_met_koffer warm_en_koud lanparty @vpro plant IMG_4616.JPG IMG_4705.JPG IMG_4603 ketel_closeup IMG_4588 gaming finalist stand golden_gate_warning_sign kleine libelle sfeervolverlichte boot
View more photos >

Categories



Meld u aan voor PayPal en begin direct met het accepteren van creditcardbetalingen.