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:
… 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.
Note: This actually sets the org.eclipse.jdt.core.classpathVariables.M2_REPO variable in the Eclipse prefs file.
In conclusion my initial dealings with Maven 2 have been quite pleasant so I think I will be sticking with it for a while.
Maven is always great when you start out with simple projects…. but if you try to do anything different it can lead to frustration. That being said whenever I go back to doing something in ant these days it feels so verbose and clunky.
This aslo makes interesting reading: http://fishbowl.pastiche.org/2007/12/20/maven_broken_by_design
Thanks Shannon. I will be giving Ant a go as well. I guess coming from Ruby land, Maven seems more familiar, given that I’ve been using things like RubyGems and Rake.
Running mvn install took at least 15 minutes and I ran into plugin not found in repository issues for the very first app I tried to package!!!! I had to add an alternate snapshot repository. So I guess I will be backing up my local M2 repository…
Theres also Raven (http://raven.rubyforge.org/) which I’ve heard is meant to be RubyGems and Rake for Java builds.