Thursday, December 22, 2011

Thoughts on the Tomcat's build system discussion

There is a huge thread about "Moving Tomcat to Maven" and in this post there will be thoughts from Linux packager POV (with Fedora specifics).

The Big Question - " To Ant or To Maven"  ?

It really doesn't matter from a Linux distribution POV. We build everything from source and the simple truth is that none of them is usable for us without the other. Maven dependencies are built with Ant and Ant dependencies are built with Maven. So we have both and support both.

What will be the benefits for us?
Maven support is getting better and better with every release and a lot more simplifications are in the work. All of these thanks to standardizations brought by Maven, to name a few there is work to automate rpm dependencies based on the Maven metadata, automation of packaging work and etc. Another possible simplification can be if mavenization is made in such a way that the implemented specifications (servlet, jsp, el ) can be build without the rest of Tomcat in a simple and obvious way. Currently in Fedora land we use Tomcat's implementation everywhere and the fact we have to build the whole Tomcat creates a number of unneeded build cycles.

What will we lose?

Usage of Maven will create additional build cycles because of the specifications jars and theirs excessive usage in Maven and friends. This will make packagers life even harder. If switch to Maven happens please consider the specification jars separation.


Making Tomcat's jars proper OSGi bundles is not something Geronimo specific.In the Eclipse land we use Tomcat artifacts too but they are always with added OSGi metadata. I really don't see how can this influence build system choice because we are really speaking about few tags in MANIFEST.MF. It's so easy to write them manually or if you want to automate the task there are both tools for Maven(maven-bundle-plugin) and Ant(osgi-bundle-ant-task). It would be really helpful in Tomcat devs maintain this part.

Other build systems?

Someone mentioned gradle as possible alternative or even as the best of both worlds. I guess it depends on the POV but in mine it's the worst of both worlds and there is a reason why it's not available in Fedora. Tomcat is critical enough piece of the Java infrastructure to stay on something common and proven and there isn't anything else but Ant and Maven that is widely spread.

P.S. If any Tomcat developer reads this one - feel free to ignore my thoughts but please post it to mailing list so other developers can consider it.

RIP Jakarta - you have done so much

Jakarta project is retired. We won't miss you as you still live in the form of Ant, Apache Commons, Lucene, Maven, Tomcat and numerous others.
This project(and it's contributors) deserves a lot of respect as this was the front office of open source in the Java world. While there were numerous other project spending their time on pure opensourcing of Java in the corporate Java world it was Jakarta that enlightened people.

There are so many Java developers for whom:
  • ant is the first build system they have used
  • tomcat is the first web container they have deployed to
  • struts is the first web framework they have used after pure jsps
  • log4j is the first logging tool they have used

I'm definitely one of these guys!

Hats off to Jakarta contributors - you have changed the Java world!