Jan
26
Filed Under (Builds) by Aneesha on 26-01-2008

I’ve only really explored Maven. I was hoping that I’d get a chance to look at Ant and some of the Ruby inspired build tools, but msbuild looks like the only tool I’ll need to be exploring for a little while - my new job is quite .NET focussed. Anyway this Blog post does a great job at listing the pro’s and con’s of Ant, Maven and Gant. Gant is a Groovy powered build system which the Grails guys are using.

Updated: Oops forgot the link!

(0) Comments    Read More   
Dec
29
Filed Under (Builds) by Aneesha on 29-12-2007

I’ve spent the last couple of days getting re-acquainted with the likes of Java mainly to prevent a total shock to the system when I start my new job in a few days. I’m coming back to Java after a 6 month programming day job break - I still played around with Java but spent evenings mostly working with either Python (for Machine Learning) or Ruby on Rails (for web stuff). Admittedly coming back to a compiled language is quite a shock to the system. I thought I’d look at Maven as an alternate to just getting Eclipse to compile and package projects for me (partly inspired by The F5 Key Is Not a Build Process blog post from Coding Horror).

So far I am impressed:

  • Compile a project
    mvn compile
  • Package my web app
    mvn package
  • Run unit tests
    mvn test
  • Skip tests but package anyway
    mvn package -Dmaven.test.skip=true

… and then I was just about to set up Eclipse to handle the dependencies myself when I discovered the Maven Eclipse plugin. The Maven Eclipse plugin generates the .classpath and .project files from the pom.xml file.

  1. Close Eclipse, if you have it running.
  2. Tell Eclipse where your Maven 2 repository resides:mvn eclipse:add-maven-repo -Declipse.workspace=”Insert path to your workspace”

    Note: This actually sets the org.eclipse.jdt.core.classpathVariables.M2_REPO variable in the Eclipse prefs file.

  3. Change to your project directory (in your workspace). Generate the Eclipse project files:mvn eclipse:eclipse

In conclusion my initial dealings with Maven 2 have been quite pleasant so I think I will be sticking with it for a while.

(2) Comments    Read More