Since the binaries are not yet available from the central Maven repository, it is necessary to add a <repository> configration to either your project's pom.xml or to your Maven installation's settings.xml.

<repositories>
    <repository>
        <id>mikaelsvensson-snapshots</id>
        <url>http://devtools.mikaelsvensson.info/repository/snapshots/</url>
        <releases>
            <enabled>false</enabled>
        </releases>
    </repository>
    <repository>
        <id>mikaelsvensson-releases</id>
        <url>http://devtools.mikaelsvensson.info/repository/releases/</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>

Configure Javadoc to Use Doclet

Sure, javadoc can be started from a console but it is most often started by build tools like Ant or Maven. This shows how to use a custom Doclet when starting Javadoc using maven-javadoc-plugin.

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            ...
            <configuration>
                <doclet>info.mikaelsvensson.devtools.doclet.xml.XmlDoclet</doclet>
                <docletArtifact>
                    <groupId>info.mikaelsvensson.devtools</groupId>
                    <artifactId>doclet</artifactId>
                    <version>1.2.2</version>
                </docletArtifact>
                ...
                <additionalparam>
                    ...
                </additionalparam>
                <useStandardDocletOptions>false</useStandardDocletOptions>
            </configuration>
            ...
        </plugin>
    </plugins>
</build>

Using XSLT and XmlDoclet is a potent combination and it gets even more powerful when one releases the awesome power of XSLT 2.0! To do this one needs to add a XSLT 2.0 library to the "doclet path". One such library is Saxon-HE 9.4 and it can be used like this:

<docletArtifacts>
    <docletArtifact>
        <groupId>info.mikaelsvensson.devtools</groupId>
        <artifactId>doclet</artifactId>
        <version>1.2.2</version>
    </docletArtifact>
    <docletArtifact>
        <groupId>net.sf.saxon</groupId>
        <artifactId>Saxon-HE</artifactId>
        <version>9.4</version>
    </docletArtifact>
</docletArtifacts>

Back to top

Reflow Maven skin by Andrius Velykis.