Tuesday, January 03, 2006
A New Hope (i.e. maven2)
Our build system is getting more and more complicated. It seems that we
achieved quite a lot by now:
- full unit test integration
- database and web unit tests
- checkstyle and clover (test coverage) integration
- support for Eclipse
I feel good about how easy it is build sipXconfig now (building sipX is a different story altogether). Quick and dirty start on wiki even let's you do it on without compiling the rest of sipX family. And even on the system without autoconf toolset (i.e. Windows)
There are things that are difficult still. Our Ant build scripts are a bit too complicated. You have to search for places to add new jars. It is easy to forget it in one place which usually results in problems after installation. Adding new modules is not as easy as it could be. We are slowly outgrowing neoconf/web structure but no-one seem to have the stomach to rip it apart. The dependencies are on the verge of being too difficult to manage.
However I have a feeling that we can do better and the more I look at Maven2 the more I think that this may be the way to go.
The big win is standardization. Sure you can run ant -p to find out what tasks are defined in the project but I suppose that few people will guess that ant precommit is what we usually run before svn ci, or that the ant run command has to be executed from web project to start jetty. Switching to maven would take care of these.
If a new tool that I want to use appears I want to use this tool and not figure out how to seamlessly add it to build system. And with maven there is a chance that if tool is useful there is a plugin to support it.
There are challenges of course:
- we use slightly different directory structure that the one suggested by maven - I am sure that there is a way to express it in pom somehow but I'd rather switch to standard
- we still need to place nice with make and autotools - sipXconfig is very often build as a part of entire sipX project and we do not want C/C++ developers to worry their pretty heads about our sophisticated and powerful build tools - let them stay in 20 century for couple of more years
- we would have to find out how big of a dependency problem we are introducing for various Linux platforms: of course java is a big problem already but that's hardly an excuse to make things even worse - the good thing is that we could just distribute maven and let it download all dependencies: a big plus for people who want to look at the source but not necessarily build everything - out LIB directory is probable >= 10MB and growing
Anyway - I'll keep trying. Watch this space for more updates.