Recent Posts

RSS Feeds

Maven - Choose Your Pain (Re: mostly hate)

So I generally feel that using maven or ant or make or shell scripts, building is a pain in the neck and what ever way you choose you will have pain. You get used to the pain of one kind or another and sort of grow to like that sort of pain and you forget that you ever lived without it. And at times you even start to defend the kind of pain that you like as pleasure. I'm having one of those moments after reading this.

Agreed maven has bugs, agreed maven has some doc problems, but...

Point 1 - the maven release plugin has its faults to be sure but more or less it works as advertised and if you are following the 'typical' path of using your SCM then the plugin even does a very nice job of keeping tags and such for you.

Point 2 - you can specify the path to the parent pom if you don't have it in the default location (e.g. ../pom.xml) in your parent descriptor (look for relativePath).

Point 3 - Agreed this is really irritating (esp the silent failures) but I've not had much trouble with Checkstyle or PMD on my 'very big' multi-module project. More detail would probably turn up some links to fix whatever issues are being experienced.

Point 4 - We use the assembly plugin with great success on Crank. Geronimo uses it as well. I could not tell what the actual problem was from the description given but I'll bet again there are ways to do that.

The 4 specific pain points I think are relatively easy to work through. The other 50+ things who knows. On my team we were tempted to write a custom plugin but we were able to make things work without it and were much better off in the long run IMO. Not that writing a custom plugin is bad, but in most of the cases on IT projects that I've seen folks writing a plugin its because they want to do something counter to the way maven expects. Such a plugin will be nothing but pain long term.

All that said, I feel his pain. I've been using maven for 2+ years and its only the last few months that I feel competent to make a big project really work. I'm not sure if that is completely a lack of docs or problems with maven. But I've gotten used to the pain of maven and I've really started to dislike the pain that I received from Ant (perhaps 2.0 will be worth a look when its done).

Permalink     5 Comments



Comments:

I agree with Bill.

Some days I love maven.

Some days I hate it. Even the days I hate it, I can't think of a build tool that is better.

If not maven, what?

Today, I like it a lot.

Posted by Rick Hightower on November 13, 2007 at 11:48 AM MST #

I'd love someone with a good background in Ant and Maven to give Buildr a really good look-over sometime. Maven's documentation drives me batty, but the standardized approach and the dependency management really has won me over. It's not so much that I love Maven 2, I just haven't used anything I like more.

I can live with Ant, but it's not a pain-free experience either.

Posted by Geoffrey Wiseman on November 13, 2007 at 08:59 PM MST #

Well speaking from the perspective of using IntelliJ and the maven plugin within IntelliJ. From what we could tell the problems are that the IntelliJ plugin has a different resolution algorithm than that of the mvn idea:idea at the command line so it often choses the wrong version of the artifact to use. Currently we have to start from a .iml file built with mvn idea:idea and make sure we don't synchronise with the pom in IntelliJ's plugin.

Posted by Robert Nicholson on November 14, 2007 at 06:53 AM MST #

The difference in that Maven is complex and Ant is pretty basic. Same thing that happens with Hibernate vs JDBC. And as JDBC is a very thin layer that sends very basic commands (procedural) to the other tools/databases, while Hibernate and Maven deal with a semantic view more top level view.

BTW I only see 2 messages (in the same "Why maven is hard?" thread) from the author of the blog Paul Keeble, so I will suppose that he didn't have that much of a problem. I think one of the best points in Maven is the huge user community, the problem is that it's "unstructured" information that is harder to consume.

Posted by Carlos Sanchez on November 17, 2007 at 05:04 AM MST #

Ya all juz forgettink to buy Maven Holy Bible
http://www.oreillymaker.com/link/8361/maven-holy-bible/

Peace Out!

Posted by Bree Myer on January 30, 2008 at 04:24 AM MST #

Post a Comment:
  • HTML Syntax: Allowed