Deploying Javadoc to ~/www

To host javadocs in your www direcotry, you need to do three steps:

  1. Generate the Javadocs
  2. Copy the docs over to your www directory
  3. Set the permissions on the www directory (755 for directories and 644 and files)

You already know how to do the first step using the javadoc command (I strongly suggest using the -d option to javadoc). The second step can simply be accomplished using the cp command.

You can set the permissions by using the following commands:

find ~/www -type d -exec chmod 775 {} \;

find ~/www -type f -exec chmod 664 {} \;


The Short Way

I wrote a script that you can use to do all three steps. Just run this script in your project base directory.