Using Ram Disk for Maven Repository on Mac OS X

October 23rd, 2009 Comments

Using Maven sometimes becomes a pain for a large project. Compiling sometimes takes forever. Recently I heard a tip on our office floor that if I use a RamDisk for maven repository it may be faster. So I tried to find out easy way to setup the RamDisk on Mac OS X (Snowleopard). Here’s how I did it.

Esperance DVThough you can use commands to create the memory based file system, there’s an excellent free preference pane from here and install it.  It is pretty straight forward from there, make sure you check Save in disk image and Self auto restore. In this way your RamDisk will be saved to the disk and restored automatically when you start the session. Now move your maven repository which defaults to ~/.m2 in Mac OS X to the newly created RamDisk. Make sure you update the location of repository in your maven’s configuration settings.xml.

If your project is small enough, you can even move the source code to the RamDisk and start up from there. I found the speed to be pretty good since the disk I/O is now minimal.

Debugging maven-jetty web application in NetBeans

May 12th, 2009 Comments

Setup Jetty to run with Debugging enabled on port 8000

export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000"

Run Jetty using Maven Plugin

mvn jetty:run

In NetBeans, Goto Debug→ Attach Debugger menu. Select Java Debugger(JPDA) and specify the port as 8000. Now you can debug the webapplication using NetBeans.

Where Am I?

You are currently browsing entries tagged with maven at VijayKiran.com.