Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

The information on this page is user-contributed. Its accuracy is not verified by the Maven team!

Tips and Surprises


Using a different doclet

 This example uses Sun's standard doclet:

           <doclet></doclet -->
           <docletPath>C:\Programm Files\Java\jdk1.5.0_05\lib\tools.jar</docletPath>


See Reporting Plugins for an example of configuring the Javadoc plugin in the <reporting> section of the pom.

Linking to external Javadocs

Aggregating Javadoc jars

Aggregating Javadoc for the website is described here.

According to this, aggregation should also work for javadoc:jar.

Working example needed!

Deploying Javadoc to a Remote Server (Windows, Putty, SCP)

So you want to generate Javadoc and put it on a web server for the world (or your company) to see. You just want the Javadoc; you don't want a site. And you don't want to have to set up key pairs for authentication with your web server; you just want to SCP the files with a username and password.

This is possible to do but takes a bit of maneuvering. The long and short of it is that you call the site-deploy goal of the maven-site-plugin, but tell it the site root is the apidocs directory.

To get started, give Maven the SSH login credentials for your Javadoc web server. You do this using a <server> tag in your settings.xml file.

(BEGIN ASIDE: Unfortunately, the <sshExecutable> tag above is not properly parsed by the 2.0-beta-6 version of the maven-site-plugin. You will need to get the 2.0-beta-7-SNAPSHOT version for the remote copy to work. To do this, add the snapshot repository as

and add the plugin dependency to your project POM file as


You now need to configure the site plugin in your POM file. For starters, you want to generate Javadoc. To do this, set your reporting tag to

In your <build> tag, configure the site plugin to only look at the apidocs directory...

Finally, configure your distribution management to distribute the site to the Javadoc web server...

That should do it. Run

and Maven should build your site and upload the Javadoc directory to your web server. If you get an error that the host is not recognized, make sure you SSH to your web server using Putty at least once in order to establish trust between your machine and the server.

  • No labels