Blogbody Rotating Header Image

Maven 2: both great and obnoxious

Maven 2 will not gain a large user base until it can provide an easy mental migration path for Ant users. Today I saw Running Ant tasks in Maven 2:

“Running Ant tasks in Maven 2 is completely different from Maven 1. In Maven 1 you could define the Ant tasks in maven.xml and run them as easily as any other Maven task. In Maven 2 this has changed, I would say for the worse. Maven 2 no longer has a maven.xml and requires that everything is a plugin.”

(Via pragmatically.net.)

I would have to to agree. Maven 2 has this weird ability to be extremely exciting, but also terribly annoying. It’s exciting because it really does do 80% of the build management for you. Unfortunately, the other 20% that it doesn’t do out of the box (and probably shouldn’t, since it is usually unique to each project) is a pain to do.

When speaking with the developers, the usual response is to “write a plugin”. Well, great. If I was a Maven developer I’m sure writing a plugin would be no big deal. In fact, I found that tweaking a plugin (such as the ultra cool IDEA plugin that generates your IDEA .iml, .ipr, and .iws files) is super painless. But it’s quite another thing to ask someone to create a new plugin from scratch, especially considering they don’t know the Maven APIs at all.

Even more, a build system is something that should be made easy. It literally can stop all development when it doesn’t work. This can be enough to frustrate users in to never looking at Maven again after they hit their first 24+ hour roadblock.

For Maven to take off, the developers need to admit that “writing a plugin” isn’t the answer for everything, especially for new users. Over time, new users such as myself should be weened off of Ant and create plugins instead. But for those of us just starting to use the project, why not provide an easier mental migration path in the form of something we’re familiar with?

3 Comments on “Maven 2: both great and obnoxious”

  1. #1 Jason Carreira
    on Jan 30th, 2006 at 10:32 am

    So did you give up on Ivy? I personally love that Ivy just does one thing, and does it well.

  2. #2 Shane Isbell
    on Jan 30th, 2006 at 10:41 am

    What I like about Maven is that, out of the box, it addresses most of the build needs, ending the endless debates from teams about how best to construct the build. With the elimination of the maven.xml file, Maven2 removes even more debate.

    Not being able to use Ant is a good feature of Maven2. The hybrid jelly/ant scripts of maven.xml could get extremely convoluted. Even worse, the plugins themselves were written in ANT/Jelly, which made modifying plugins about as enjoyable as modifying a JSP full of HTML, scriplets and Javascipt.

    As for more wide spread adoption of Maven2, perhaps you are right. JSPs did not take off because they were easy to maintain, but rather because they were easy to hack something together. But then again, hacking your build system is not the best of ideas.

    If you need to use Ant in a limited way you, that is still provided:
    http://maven.apache.org/plugins/maven-antrun-plugin/index.html. If user need to use a lot of Ant scripts, then Ant is probably a more appropriate build tool.

  3. #3 Patrick Lightbody
    on Jan 30th, 2006 at 6:15 pm

    Shane – sure, and I already concede that plugins are probably better. But like I said, the mental migration path is far from complete, and as long as it stays that way, maven will remain a niche tool.

Leave a Comment