I've certainly bitched & moaned about maven in the past. But now, I wouldn't be without it. I feel that the benefits far outweigh any problems. Chiefly:
- Standardized project structure.
- Given a new developer joining a project:
- When you say it's a Maven project, then developer knows the project layout and how to build and package the project
- When you say it's an Ant project, then developer will have to wait for you to explain more or will have to go through the build.xml to figure things out.
- Of course, it's always possible to impose on company-wide standard with Ant but I think more often than not, you will be re-inventing the proverbial wheel.
- Dependency management.
- Not just with external libraries but also with internal libraries/modules. Be sure to use a Maven repository proxy server such as Nexus or Artifactory.
- It's possible to do some of this with Ivy. In fact, if all you need is a dependency management, you're probably better off using Ivy.
- Particularly within a project. I've found it quite useful to break out little subprojects, and maven handles this well. It's much more difficult with ant.
- Standardized artifact management (especially in conjunction with nexus or artifactory)
- The release-plugin is wonderful.
- The Eclipse & NetBeans integration is quite good.
- Integration with hudson is superb. Particularly the trend graphs for things like findbugs.
- It's a minor point, but the fact that maven embeds details like the version number inside the jar or war (not just in the filename) by default is tremendously helpful.
The downsides for me are chiefly:
- The command line is quite unhelpful. This put me off a lot to begin with.
- The XML format is very verbose. I can see why it was done that way, but it's still a pain to read.
- That said, it's got an XSD for easy editing in an IDE.
- It's difficult to get your head round it in the beginning. Things like the lifecycle, for example.
- The definitive guide to maven is a good introduction however.
I truly believe that it's worth spending a little bit of time getting to know maven.