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.

OSGification?

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.

No comments: