* documentation should be served from the root of the JAR.
* @param fallbackToJar Whether the doc handler should fall back to the jar repo for docs.
*/
public static BuildDocHandler fromDirectoryAndJar(File directory, JarFile jarFile, String base, boolean fallbackToJar) {
FileRepository fileRepo = new FilesystemRepository(directory);
FileRepository jarRepo = new JarRepository(jarFile, Option.apply(base));
FileRepository manualRepo;
if (fallbackToJar) {
manualRepo = new AggregateFileRepository(new FileRepository[] { fileRepo, jarRepo });
} else {
manualRepo = fileRepo;