Developing a project site with Maven 2.0

The last week or so I have been developing a new version of the http://ehcache.sf.net project web site with Maven 2.0.

Why? The old site featured a couple of toilet roll web pages, the longest of which was 2026 lines. That’s a long toilet roll. With the upcoming release of 1.2 and a lot more features to write about, something had to give. I knew I wanted a nice side nav bar and to provide some extra info about the project over what I had been doing. I thought about doing all the redesign by hand or moving the site to confluence, which I have an open source license for. But I am lazy.

I met the guys from Maven 2.0 in Portland at last year’s OSCON and I knew that Mergere was paying about 8 guys to work on Maven 2.0 full time. So I went to take a look at what they were up to. It looked like there was a lot of stuff you get free out of the box.

A week later and the site is done. I think it is a big improvement over what was there, and I think Maven 2.0 ended up being a pretty good choice to to it. From here on it will be very easy to maintain.

So, what did I think?

The Good

  • APT, Maven 2’s simple documentation adopted tag language, is simple with a very easy to learn syntax and high productivity.
  • You can call into Ant for stuff that Maven does not do. Nice.
  • Tons and tons of great reports and site output that are generated from your pom.xml or with a little plugin setup.
  • The #maven channel at irc.codehaus.org. Thanks guys!

The Bad

  • APT is limited. No superscripts. Difficult to combine multiple things or it gets confused.
  • Maven is hard to get into.
  • Very poor documentation. I logged a few bugs on this. Unless the maven guys want to keep getting bugged on IRC they need to write more and better doco.
  • Maven 2 has a lot less plugins than Maven 1.

The Ugly

  • Doxia barfs on APT when you have a tag mismatch with an error like “missing ‘>'”. Try finding that in a 500 line document with no line number indicated.
  • A general lack of useful error messages which pinpoint what is really going on. SCM and Clover plugins are partiularly bad.
  • MOJO properties don’t seem to have a standard naming convention. I got caught up with seemingly random variations around the_tag, theTag and thetag.

Where to now? I am not yet building ehcache on Maven. I did restructure the code to follow the Maven directory structure. The Ant build works very well however and I am wary about how much time it will take to get everything working. Maybe version 2.1.

Would I recommend it? If you like the new ehcache site, you can get the same thing for your own project , using ehcache as an example, in no time. But if you do. copy the ehcache pom.xml. Those 424 lines of config were hard won.

Published
Categorized as Java

By Greg Luck

As Terracotta’s CTO, Greg (@gregrluck) is entrusted with understanding market and technology forces and the business drivers that impact Terracotta’s product innovation and customer success. He helps shape company and technology strategy and designs many of the features in Terracotta’s products. Greg came to Terracotta on the acquisition of the popular caching project Ehcache which he founded in 2003. Prior to joining Terracotta, Greg served as Chief Architect at Australian online travel giant Wotif.com. He also served as a lead consultant for ThoughtWorks on accounts in the United States and Australia, was CIO at Virgin Blue, Tempo Services, Stamford Hotels and Resorts and Australian Resorts and spent seven years as a Chartered Accountant in KPMG’s small business and insolvency divisions. He is a regular speaker at conferences and contributor of articles to the technical press.