Hobione's Weblog

Living & Breathing in Web 2.0 Era

Maven Jetty-plugin and IntelliJ IDEA

Scenario: You have a maven project and you want to tie with IntelliJ 9 to make it part of IDE built-in commands instead of using command line interface.

Pre-requisite: Need to read Maven Jetty-Plugin User Guide.

Solution: Here is a skeleton project hierarchy:
You also should have a pom.xml file directly under the project.

Now, open up the IntelliJ. Go to File –> Open Project and choose the pom.xml file to bring the project into Intellij and here how it looks. Notice, Idea has created few extraneous files like .impl, .ipr and .iws.
Project in Intellij

How to configure Run command?
In the IDEA, go to Run –> Edit Configurations
You see the “Run/Debug Configurations” window. Under Parameters tab choose the directory and set the goal command:
Run/Debug Configurations

Under Runner tab, set VM Parameters to these: (You may not need to sett all these)


Runner Tab

Application is ready to run by click the play button.
Play Button
Here is the proof:
Jetty Run

How to configure Build?

It should shows the Build option to the IDEA drop down. Choose the Build option and click the play button.
Build with Play Button

How to configure clean?
Clean Project from target directory

How to configure scm bootstrap?
SCM BootStrap

Here is the final configured list looks like:
Configured List

Hopefully, this post will help me to remember and configure all my future apps with maven jetty-plugin in IntelliJ Idea.


September 22, 2010 - Posted by | Maven

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: