Maven tip o' the day: use a custom stylesheet
One of Maven's best features is its ability to generate websites with project documentation. In most cases, it'll motivate developers to improve the documentation for their project. At least it has for me with Struts Menu. However, Maven makes the worst mistake in the history of web development - it doesn't set a default background color. A lot of idiots do this these days, so do me a favor folks - change the default background color on your browser to something obnoxious. Mine is set to bright orange right now. Try changing yours to orange and then visiting the Maven site - its fugly.
This issue isn't as bad as it used to be. Most people don't notice it, but "back in the day" when browser's used gray as their default - it was an issue. Maybe I'm just old fashioned.
Anyway, back to Maven. Yesterday, I was responsible for upgrading some Maven sample apps to the latest RC3, which makes the mistake mentioned above (RC1 did not). Usually when you encounter these issues in Mavenland, you click 5 times (Google with Firefox makes it 1 click) to find the plugins site and then look for its properties. In this case it's xdoc, which has a horrendous number of UI Color Settings.
These settings have two major problems. First of all, they don't work with RC3, and secondly - it's an awful way to define the colors and such for your site. Especially since its mostly related to colors. A better way that I've found is to put a maven-theme.css file in your xdocs/stylesheets
directory. This will override Maven's default stylesheet and you get a lot more control over the look and feel of your Mavenized project site. The easiest way to get a template to start with is to generate your site and then copy target/docs/style/maven-theme.css
into this directory. Hope this helps make Maven a little bit easier.
Posted by Carlos Sanchez on June 28, 2004 at 05:08 PM MDT #