- Download the attached doc.zip.
- doc/api contains the stylesheet and images for Javadoc. Extract them into the existing Javadoc output to overwrite the existing stylesheet.
- doc/xref contains the stylesheet and images for cross-reference report generated by maven-jxr-plugin. Extract them into the existing Xref output to overwrite the existing stylesheet.
To apply the stylesheet with maven-javadoc-plugin, you need to add three configuration properties in your pom.xml:
... <plugin> <artifactId>maven-javadoc-plugin</artifactId> <!-- Note: Older versions will not work. --> <version>2.6.1</version> ... <configuration> ... <stylesheetfile>${basedir}/src/javadoc/stylesheet.css</stylesheetfile> <javadocDirectory>${basedir}/src/javadoc</javadocDirectory> <docfilessubdirs>true</docfilessubdirs> ... </configuration> </plugin> ...
In the example above, the images are located in the ${basedir}/src/javadoc/resources directory.
Unfortunately, there's no built-in option that makes the maven-jxr-plugin to copy the images. As a workaround, you can modify the stylesheet to refer to the Javadoc resources using relative path (e.g. url(../javadoc/resources/*) instead of url(resources/*)).
Comments