A journey through Maven Land
No, this is not one of my Maven rants, though it could easily be. This is however a short tale on how the Velocity site has been set up using Apache Maven 2 and a number of plugins written for Maven 2.
What I wanted to have is a site that pulls some information out of the Site POM and still uses the Maven 2 Site plugin and the reports to build.
In the end, I wrote for the site
- A Plugin that allows the Maven 2 renderer (Doxia) to render pages generated from Velocity templates (this is after all for the Velocity site…)
- A custom skin to get the look and feel of the old Velocity site, though it is already discusses as “antiquated”. But now it is only a simple matter of changing a CSS file. And generating the site with its own custom skin, allowed us to sneak in a RSS feed that you can subscribe to if you want to keep up to date with Velocity news.
- And finally a plugin that reads an XML formatted news file and builds teaser elements, a news page and (by using the amazing powers of the Rome library) create an RSS 2.0 feed about the news.
Nothing of that stuff is really Velocity specific, though it got created for the Velocity site and will stay here (under site/tools) for a while. Brett suggested the Maven sandbox but having experienced how stuff in Maven land moves like a quagmire in a hail storm, I do not want to put essential site building tools there (yet?).
Ah well, in the progress of that, I learned more about Maven, Plexus, Doxia and the rest of the zoo than I really wanted [1, 2, 3, 4, 5, 6, 7] and in the end I had to rewrite a part of the Doxia Decoration Model to get my reactor built site to get all the links and breadcrumbs right (You never heard of the Doxia Decoration Model? That is not really surprising. There are zero docs about it). But I said that I do not want to rant.
So in the end, yes: The resulting site is satisfying to me and hopefully also to our users. Comments welcome.
apache code maven velocity
One Response to “A journey through Maven Land”
1 Andre 22 March 2008 @ 12:24
Just went to the Velocity site and build the doxia tool, but even so it runs it doesn’t create any html pages from its apt sources.
Doxia tools could be very useful, perhaps you could take another look at it.
Thanks
Andre
Leave a Reply