The colapi plug-in formats and colorize Java(tm) code identified by the tags [code]...[/code] in the javadoc description. The tool formats/colorizes code in the html files generated by javadoc.
To use it in a POM.xml file:
<plugin>
<groupId>javolution</groupId>
<artifactId>colapi</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<goals>
<goal>colorize</goal>
</goals>
</execution>
</executions>
</plugin>
To access the repository from your project, add the following to your settings.xml or pom.xml between the tags <pluginRepositories>.
<pluginRepository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</pluginRepository>
If you're behind a proxy, check the Maven guide to using proxies to configure maven 2 with your proxy.
| directory | The location of the directory containing the files to process recurcively (default ${project.build.directory}/site/apidocs). |
| filter | The pathname filter (regex) of the files to colorize (default .*\.html$). |
| encoding | The file encoding (default UTF-8). |
| keywordColor | The RGB color for keywords (default #7F0055). |
| commentColor | The RGB color for comments (default #3F7F5F). |
| stringColor | The RGB color for strings (default #0000A0). |
The project source code can be found here.