Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1936,12 +1936,6 @@ protected void executeReport(Locale unusedLocale) throws MavenReportException {
}
javadocOutputDirectory.mkdirs();

// ----------------------------------------------------------------------
// Copy all resources
// ----------------------------------------------------------------------

copyAllResources(javadocOutputDirectory);

// ----------------------------------------------------------------------
// Create command line for Javadoc
// ----------------------------------------------------------------------
Expand Down Expand Up @@ -4971,12 +4965,17 @@ private void addTagletsFromTagletArtifacts(List<String> arguments) throws MavenR
* @throws MavenReportException if any errors occur
*/
private void executeJavadocCommandLine(Commandline cmd, File javadocOutputDirectory) throws MavenReportException {
// Resources must be copied only when Javadoc is actually (re)generated. copyAllResources removes
// excluded doc-file subdirectories from the output directory; if it ran while generation was skipped
// as up to date, those files would be deleted without being regenerated, leaving the output incomplete.
if (staleDataPath != null) {
if (!isUpToDate(cmd)) {
copyAllResources(javadocOutputDirectory);
doExecuteJavadocCommandLine(cmd, javadocOutputDirectory);
StaleHelper.writeStaleData(cmd, staleDataPath.toPath());
}
} else {
copyAllResources(javadocOutputDirectory);
doExecuteJavadocCommandLine(cmd, javadocOutputDirectory);
}
}
Expand Down