Search code examples
javamavenjavadocmaven-javadoc-plugin

Best way to set alternate JavaDoc location for all modules?


I'd like to set an alternate JavaDoc location for all my modules in a multi-module maven project. Unfortunately, I have to rely on relative paths, or else use maven properties like ${basedir}, since this is a team project on subversion, and no absolute path will be the same for all of us.

What is the best way to do this? If I have a project structure

parent
   sub1
   sub2
   sub3
      docs

And I want to place the API in sub3/docs, then how can I point all my modules to output HTML files in sub3/docs, when the parent module will recognize a different path to it than the submodules?

Thanks in advance.


Solution

  • You want to pollute your project build as little as possible, especially with repeated build tweaks. Instead, you're better off creating a separate build process that assembles the javadoc output from its standard location in all projects and publishes it somewhere desirable.