From afb2dee6b644dc5cd921eec0395ed40d6d6dc0c2 Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Sun, 29 Oct 2023 23:26:16 +0100 Subject: [PATCH] [MJAVADOC-713] Skipping Javadoc reportset leaves empty Javadoc link in site This closes #246 --- .../org/apache/maven/plugins/javadoc/JavadocReport.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/javadoc/JavadocReport.java b/src/main/java/org/apache/maven/plugins/javadoc/JavadocReport.java index 5bab790ec..0d857831e 100644 --- a/src/main/java/org/apache/maven/plugins/javadoc/JavadocReport.java +++ b/src/main/java/org/apache/maven/plugins/javadoc/JavadocReport.java @@ -221,7 +221,7 @@ public boolean isExternalReport() { public boolean canGenerateReport() { boolean canGenerate = false; - if (this.isAggregator() || !"pom".equals(this.project.getPackaging())) { + if (!skip && (this.isAggregator() || !"pom".equals(this.project.getPackaging()))) { Collection sourcePaths; Map> files; try { @@ -289,11 +289,6 @@ private void updateReportOutputDirectory(File reportOutputDirectory, String dest /** {@inheritDoc} */ @Override public void doExecute() throws MojoExecutionException, MojoFailureException { - if (skip) { - getLog().info("Skipping javadoc generation"); - return; - } - File outputDirectory = new File(getOutputDirectory()); String filename = getOutputName() + ".html";