I recently standardized the location of Javadoc for several of Square’s Java open source projects. Here’s a sample:

We post Javadoc for the latest release of each major version. Each artifact’s docs are published separately.

I wrote Osstrich to make this simple & repeatable. It copies Javadocs from Maven Central to GitHub Project Pages.

If you want to follow this pattern to document your own GitHub projects, release to Maven Central and create a gh-pages branch. Then run the following:

git clone git@github.com:square/osstrich.git cd osstrich mvn compile mvn exec:java \ -Dexec.mainClass=com.squareup.osstrich.JavadocPublisher \ -Dexec.args="temp git@github.com:square/moshi.git com.squareup.moshi"