Maven2 has been out for a few weeks now and I got chance to spend some time with it this long weekend.
What’s great about it
- Really enables you to keep your build scripts short. Actually, if you a following common standards for your project structure and artifacts then very little is necessary beyond describing your dependencies.
- Dependencies management. This is the killer enhancement over Maven 1.x. Maven 2 projects describe their dependencies and the build process manages resolving dependency issues for you. This includes resolving versions and downloading the jars from the central repository.
- Architecture of participation – Maven is incredibly modular. Every task and plugin is a module which makes it very easy for people to get involved and make enhancements.
What’s tricky about it
- Other people’s dependency problems can become yours. The metadata in the Maven repository is in pretty good shape and getting better all the time. But if one of your dependencies is b0rked, so is your build.
- Some jars from Sun can’t be distributed so you need to add them to your repository manually. This can be frustrating but isn’t too bad.
As application assembly picks up the ability to pull together project dependencies quickly is going to be key. For exaple, the Alfresco src download consists of 84 jars that are needed for compilation and/or runtime. That doesn’t count the jars created by the Alresco build.
Now that I’m up on Maven 2, my old ant-based builds seem incredibly complicated.