Currently the Javadoc sourcepath can only be set using options.addPathOption(‘sourcepath’, blabla). Other things, like classpath, bootclasspath, doclet, docletpath are all included in the CoreJavadocOptions. Since sourcepath is also a default Javadoc option, it should be included in the CoreJavadocOptions.
We need to set the sourcepath because we’re using GWT jars, which contain broken source files. Without a sourcepath the Javadoc tool will break on these jars, since it searches the whole classpath for sourcefiles.