You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2023/11/19 20:44:46 UTC
(maven-javadoc-plugin) branch doxia-2.0.0 updated (f877d109 -> 99d4d646)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch doxia-2.0.0
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git
discard f877d109 Align plugin with AbstractMavenReport
discard 09f0adad Prepare for Doxia 2.0.0
add 0104ab2c Fix incorrect config in test-javadoc-test-plugin-config.xml
new 97187938 Prepare for Doxia 2.0.0
new 99d4d646 Align plugin with AbstractMavenReport
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (f877d109)
\
N -- N -- N refs/heads/doxia-2.0.0 (99d4d646)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
(maven-javadoc-plugin) 01/02: Prepare for Doxia 2.0.0
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch doxia-2.0.0
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git
commit 97187938908bb6a567c115269d47e8c3c10b6837
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Apr 30 11:25:56 2023 +0200
Prepare for Doxia 2.0.0
---
pom.xml | 28 ++++---
src/it/mrm/3rdparty/_doclet-1.0.jar | Bin 0 -> 1542 bytes
src/it/mrm/repository/_mjavadoc450-static.jar | Bin 0 -> 858 bytes
.../maven/plugins/javadoc/AbstractJavadocMojo.java | 83 +++++----------------
.../apache/maven/plugins/javadoc/JavadocJar.java | 4 +-
.../maven/plugins/javadoc/JavadocReport.java | 19 ++---
.../javadoc/AggregatorJavadocReportTest.java | 8 +-
.../maven/plugins/javadoc/JavadocJarTest.java | 7 +-
.../maven/plugins/javadoc/JavadocReportTest.java | 20 +++--
.../plugins/javadoc/TestJavadocReportTest.java | 7 +-
.../wrong-locale-test-plugin-config.xml | 51 -------------
11 files changed, 65 insertions(+), 162 deletions(-)
diff --git a/pom.xml b/pom.xml
index 64071fc3..44fee50c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@ under the License.
</parent>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>3.6.3-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Apache Maven Javadoc Plugin</name>
@@ -112,16 +112,15 @@ under the License.
<properties>
<javaVersion>8</javaVersion>
<mavenVersion>3.2.5</mavenVersion>
- <doxiaVersion>1.11.1</doxiaVersion>
- <doxia-sitetoolsVersion>1.11.1</doxia-sitetoolsVersion>
+ <doxiaSitetoolsVersion>2.0.0-M13</doxiaSitetoolsVersion>
<wagonVersion>2.4</wagonVersion>
<aetherVersion>1.0.0.v20140518</aetherVersion>
<!-- https://cwiki.apache.org/confluence/x/VIHOCg#MavenEcosystemCleanup-ResolverandMaven -->
<plexus-java.version>1.2.0</plexus-java.version>
<jetty.version>9.4.51.v20230217</jetty.version>
<!-- for ITs -->
- <sitePluginVersion>3.12.1</sitePluginVersion>
- <projectInfoReportsPluginVersion>3.4.2</projectInfoReportsPluginVersion>
+ <sitePluginVersion>4.0.0-M11</sitePluginVersion>
+ <projectInfoReportsPluginVersion>4.0.0-M1-SNAPSHOT</projectInfoReportsPluginVersion>
<project.build.outputTimestamp>2023-11-03T20:32:23Z</project.build.outputTimestamp>
<slf4jVersion>1.7.36</slf4jVersion>
</properties>
@@ -209,7 +208,7 @@ under the License.
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-api</artifactId>
- <version>3.1.1</version>
+ <version>4.0.0-M8</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
@@ -235,21 +234,20 @@ under the License.
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-sink-api</artifactId>
- <version>${doxiaVersion}</version>
+ <version>2.0.0-M8</version>
</dependency>
<!-- Doxia-sitetools -->
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-site-renderer</artifactId>
- <version>${doxia-sitetoolsVersion}</version>
- <exclusions>
- <exclusion>
- <!-- MJAVADOC-726 -->
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity-tools</artifactId>
- </exclusion>
- </exclusions>
+ <version>${doxiaSitetoolsVersion}</version>
+ </dependency>
+ <!-- Doxia-sitetools -->
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-integration-tools</artifactId>
+ <version>${doxiaSitetoolsVersion}</version>
</dependency>
<!-- wagon -->
diff --git a/src/it/mrm/3rdparty/_doclet-1.0.jar b/src/it/mrm/3rdparty/_doclet-1.0.jar
new file mode 100644
index 00000000..95b7d5f4
Binary files /dev/null and b/src/it/mrm/3rdparty/_doclet-1.0.jar differ
diff --git a/src/it/mrm/repository/_mjavadoc450-static.jar b/src/it/mrm/repository/_mjavadoc450-static.jar
new file mode 100644
index 00000000..0daddbcf
Binary files /dev/null and b/src/it/mrm/repository/_mjavadoc450-static.jar differ
diff --git a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
index fb2d928d..e7028345 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
@@ -65,6 +65,7 @@ import org.apache.maven.artifact.handler.ArtifactHandler;
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
import org.apache.maven.artifact.versioning.ArtifactVersion;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
+import org.apache.maven.doxia.tools.SiteTool;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.model.Dependency;
import org.apache.maven.model.Plugin;
@@ -269,6 +270,12 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
// Mojo components
// ----------------------------------------------------------------------
+ /**
+ * SiteTool.
+ */
+ @Component
+ protected SiteTool siteTool;
+
/**
* Archiver manager
*
@@ -328,8 +335,8 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
@Parameter(defaultValue = "${project}", readonly = true, required = true)
protected MavenProject project;
- @Parameter(defaultValue = "${mojoExecution}", readonly = true)
- private MojoExecution mojo;
+ @Parameter(defaultValue = "${mojoExecution}", readonly = true, required = true)
+ protected MojoExecution mojoExecution;
/**
* Specify if the Javadoc plugin should operate in offline mode. If maven is run in offline
@@ -421,8 +428,8 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
/**
* The projects in the reactor for aggregation report.
*/
- @Parameter(property = "reactorProjects", readonly = true)
- private List<MavenProject> reactorProjects;
+ @Parameter(defaultValue = "${reactorProjects}", required = true, readonly = true)
+ protected List<MavenProject> reactorProjects;
/**
* Set this to <code>true</code> to debug the Javadoc plugin. With this, <code>javadoc.bat(or.sh)</code>,
@@ -1828,7 +1835,7 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
abstract void doExecute() throws MojoExecutionException, MojoFailureException;
protected final void verifyRemovedParameter(String paramName) {
- Xpp3Dom configDom = mojo.getConfiguration();
+ Xpp3Dom configDom = mojoExecution.getConfiguration();
if (configDom != null) {
if (configDom.getChild(paramName) != null) {
throw new IllegalArgumentException(
@@ -1838,7 +1845,7 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
}
private void verifyReplacedParameter(String oldParamName, String newParamNew) {
- Xpp3Dom configDom = mojo.getConfiguration();
+ Xpp3Dom configDom = mojoExecution.getConfiguration();
if (configDom != null) {
if (configDom.getChild(oldParamName) != null) {
throw new IllegalArgumentException("parameter '" + oldParamName + "' has been replaced with "
@@ -4250,64 +4257,8 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
}
// locale
- if (this.locale != null && !this.locale.isEmpty()) {
- StringTokenizer tokenizer = new StringTokenizer(this.locale, "_");
- final int maxTokens = 3;
- if (tokenizer.countTokens() > maxTokens) {
- throw new MavenReportException(
- "Unsupported option <locale/> '" + this.locale + "', should be language_country_variant.");
- }
-
- Locale localeObject = null;
- if (tokenizer.hasMoreTokens()) {
- String language = tokenizer.nextToken().toLowerCase(Locale.ENGLISH);
- if (!Arrays.asList(Locale.getISOLanguages()).contains(language)) {
- throw new MavenReportException(
- "Unsupported language '" + language + "' in option <locale/> '" + this.locale + "'");
- }
- localeObject = new Locale(language);
-
- if (tokenizer.hasMoreTokens()) {
- String country = tokenizer.nextToken().toUpperCase(Locale.ENGLISH);
- if (!Arrays.asList(Locale.getISOCountries()).contains(country)) {
- throw new MavenReportException(
- "Unsupported country '" + country + "' in option <locale/> '" + this.locale + "'");
- }
- localeObject = new Locale(language, country);
-
- if (tokenizer.hasMoreTokens()) {
- String variant = tokenizer.nextToken();
- localeObject = new Locale(language, country, variant);
- }
- }
- }
-
- if (localeObject == null) {
- throw new MavenReportException(
- "Unsupported option <locale/> '" + this.locale + "', should be language_country_variant.");
- }
-
- this.locale = localeObject.toString();
- final List<Locale> availableLocalesList = Arrays.asList(Locale.getAvailableLocales());
- if (StringUtils.isNotEmpty(localeObject.getVariant()) && !availableLocalesList.contains(localeObject)) {
- StringBuilder sb = new StringBuilder();
- sb.append("Unsupported option <locale/> with variant '").append(this.locale);
- sb.append("'");
-
- localeObject = new Locale(localeObject.getLanguage(), localeObject.getCountry());
- this.locale = localeObject.toString();
-
- sb.append(", trying to use <locale/> without variant, i.e. '")
- .append(this.locale)
- .append("'");
- if (getLog().isWarnEnabled()) {
- getLog().warn(sb.toString());
- }
- }
-
- if (!availableLocalesList.contains(localeObject)) {
- throw new MavenReportException("Unsupported option <locale/> '" + this.locale + "'");
- }
+ if (StringUtils.isNotEmpty(this.locale)) {
+ this.locale = siteTool.getSiteLocales(locale).get(0).toString();
}
}
@@ -6042,6 +5993,10 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
}
}
+ protected List<MavenProject> getReactorProjects() {
+ return reactorProjects;
+ }
+
/**
* @param prefix The prefix of the exception.
* @param e The exception.
diff --git a/src/main/java/org/apache/maven/plugins/javadoc/JavadocJar.java b/src/main/java/org/apache/maven/plugins/javadoc/JavadocJar.java
index e295edd2..98bed568 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/JavadocJar.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/JavadocJar.java
@@ -21,12 +21,12 @@ package org.apache.maven.plugins.javadoc;
import java.io.File;
import java.io.IOException;
import java.util.List;
-import java.util.Locale;
import org.apache.maven.archiver.MavenArchiveConfiguration;
import org.apache.maven.archiver.MavenArchiver;
import org.apache.maven.artifact.DependencyResolutionRequiredException;
import org.apache.maven.artifact.handler.ArtifactHandler;
+import org.apache.maven.doxia.tools.SiteTool;
import org.apache.maven.model.Resource;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Component;
@@ -178,7 +178,7 @@ public class JavadocJar extends AbstractJavadocMojo {
}
try {
- executeReport(Locale.getDefault());
+ executeReport(SiteTool.DEFAULT_LOCALE);
} catch (MavenReportException e) {
failOnError("MavenReportException: Error while generating Javadoc", e);
} catch (RuntimeException e) {
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 0d857831..b5058fcc 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/JavadocReport.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/JavadocReport.java
@@ -28,8 +28,9 @@ import java.util.stream.Collectors;
import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.doxia.sink.SinkFactory;
-import org.apache.maven.doxia.siterenderer.RenderingContext;
+import org.apache.maven.doxia.siterenderer.DocumentRenderingContext;
import org.apache.maven.doxia.siterenderer.sink.SiteRendererSink;
+import org.apache.maven.doxia.tools.SiteTool;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Execute;
@@ -117,11 +118,6 @@ public class JavadocReport extends AbstractJavadocMojo implements MavenMultiPage
}
/** {@inheritDoc} */
- @Override
- public void generate(org.codehaus.doxia.sink.Sink sink, Locale locale) throws MavenReportException {
- generate(sink, null, locale);
- }
-
public void generate(Sink sink, Locale locale) throws MavenReportException {
generate(sink, null, locale);
}
@@ -236,9 +232,6 @@ public class JavadocReport extends AbstractJavadocMojo implements MavenMultiPage
canGenerate = canGenerateReport(files);
}
- if (getLog().isDebugEnabled()) {
- getLog().debug(" canGenerateReport = " + canGenerate + " for project " + this.project);
- }
return canGenerate;
}
@@ -293,16 +286,16 @@ public class JavadocReport extends AbstractJavadocMojo implements MavenMultiPage
String filename = getOutputName() + ".html";
- Locale locale = Locale.getDefault();
+ Locale locale = SiteTool.DEFAULT_LOCALE;
try {
- // TODO Replace null with real value
- RenderingContext docRenderingContext = new RenderingContext(outputDirectory, filename, null);
+ String reportMojoInfo = mojoExecution.getPlugin().getId() + ":" + mojoExecution.getGoal();
+ DocumentRenderingContext docRenderingContext =
+ new DocumentRenderingContext(outputDirectory, filename, reportMojoInfo);
SiteRendererSink sink = new SiteRendererSink(docRenderingContext);
generate(sink, null, locale);
-
} catch (MavenReportException | RuntimeException e) {
failOnError("An error has occurred in " + getName(Locale.ENGLISH) + " report generation", e);
}
diff --git a/src/test/java/org/apache/maven/plugins/javadoc/AggregatorJavadocReportTest.java b/src/test/java/org/apache/maven/plugins/javadoc/AggregatorJavadocReportTest.java
index 9097ab9e..36bd7d89 100644
--- a/src/test/java/org/apache/maven/plugins/javadoc/AggregatorJavadocReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/javadoc/AggregatorJavadocReportTest.java
@@ -62,8 +62,12 @@ public class AggregatorJavadocReportTest extends AbstractMojoTestCase {
private JavadocReport lookupMojo(File testPom) throws Exception {
JavadocReport mojo = (JavadocReport) lookupMojo("aggregate", testPom);
- MojoExecution mojoExec = new MojoExecution(new Plugin(), "aggregate", null);
- setVariableValueToObject(mojo, "mojo", mojoExec);
+ Plugin p = new Plugin();
+ p.setGroupId("org.apache.maven.plugins");
+ p.setArtifactId("maven-javadoc-plugin");
+ MojoExecution mojoExecution = new MojoExecution(p, "aggregate", null);
+
+ setVariableValueToObject(mojo, "mojoExecution", mojoExecution);
MavenProject currentProject = new MavenProjectStub();
currentProject.setGroupId("GROUPID");
diff --git a/src/test/java/org/apache/maven/plugins/javadoc/JavadocJarTest.java b/src/test/java/org/apache/maven/plugins/javadoc/JavadocJarTest.java
index 5f36eddd..49719af3 100644
--- a/src/test/java/org/apache/maven/plugins/javadoc/JavadocJarTest.java
+++ b/src/test/java/org/apache/maven/plugins/javadoc/JavadocJarTest.java
@@ -49,9 +49,12 @@ public class JavadocJarTest extends AbstractMojoTestCase {
private JavadocJar lookupMojo(File testPom) throws Exception {
JavadocJar mojo = (JavadocJar) lookupMojo("jar", testPom);
- MojoExecution mojoExec = new MojoExecution(new Plugin(), "javadoc", null);
+ Plugin p = new Plugin();
+ p.setGroupId("org.apache.maven.plugins");
+ p.setArtifactId("maven-javadoc-plugin");
+ MojoExecution mojoExecution = new MojoExecution(p, "jar", null);
- setVariableValueToObject(mojo, "mojo", mojoExec);
+ setVariableValueToObject(mojo, "mojoExecution", mojoExecution);
MavenProject currentProject = new MavenProjectStub();
currentProject.setGroupId("GROUPID");
diff --git a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
index b4a8c391..cb282d07 100644
--- a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
@@ -27,6 +27,7 @@ import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -113,17 +114,23 @@ public class JavadocReportTest extends AbstractMojoTestCase {
private JavadocReport lookupMojo(Path testPom) throws Exception {
JavadocReport mojo = (JavadocReport) lookupMojo("javadoc", testPom.toFile());
- MojoExecution mojoExec = new MojoExecution(new Plugin(), "javadoc", null);
+ Plugin p = new Plugin();
+ p.setGroupId("org.apache.maven.plugins");
+ p.setArtifactId("maven-javadoc-plugin");
+ MojoExecution mojoExecution = new MojoExecution(p, "javadoc", null);
- setVariableValueToObject(mojo, "mojo", mojoExec);
+ setVariableValueToObject(mojo, "mojoExecution", mojoExecution);
MavenProject currentProject = new MavenProjectStub();
currentProject.setGroupId("GROUPID");
currentProject.setArtifactId("ARTIFACTID");
+ List<MavenProject> reactorProjects =
+ mojo.getReactorProjects() != null ? mojo.getReactorProjects() : Collections.emptyList();
MavenSession session = newMavenSession(currentProject);
setVariableValueToObject(mojo, "session", session);
setVariableValueToObject(mojo, "repoSession", session.getRepositorySession());
+ setVariableValueToObject(mojo, "reactorProjects", reactorProjects);
return mojo;
}
@@ -1045,15 +1052,6 @@ public class JavadocReportTest extends AbstractMojoTestCase {
assertTrue("No wrong charset catch", e.getMessage().contains("Unsupported option <charset/>"));
}
- // locale
- testPom = unit.resolve("validate-options-test/wrong-locale-test-plugin-config.xml");
- mojo = lookupMojo(testPom);
- try {
- mojo.execute();
- fail("No wrong locale catch");
- } catch (MojoExecutionException e) {
- assertTrue("No wrong locale catch", e.getMessage().contains("Unsupported option <locale/>"));
- }
testPom = unit.resolve("validate-options-test/wrong-locale-with-variant-test-plugin-config.xml");
mojo = lookupMojo(testPom);
mojo.execute();
diff --git a/src/test/java/org/apache/maven/plugins/javadoc/TestJavadocReportTest.java b/src/test/java/org/apache/maven/plugins/javadoc/TestJavadocReportTest.java
index c7c7ba6d..c60e0a1a 100644
--- a/src/test/java/org/apache/maven/plugins/javadoc/TestJavadocReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/javadoc/TestJavadocReportTest.java
@@ -43,9 +43,12 @@ public class TestJavadocReportTest extends AbstractMojoTestCase {
new File(getBasedir(), "src/test/resources/unit/test-javadoc-test/test-javadoc-test-plugin-config.xml");
TestJavadocReport mojo = (TestJavadocReport) lookupMojo("test-javadoc", testPom);
- MojoExecution mojoExec = new MojoExecution(new Plugin(), "test-javadoc", null);
+ Plugin p = new Plugin();
+ p.setGroupId("org.apache.maven.plugins");
+ p.setArtifactId("maven-javadoc-plugin");
+ MojoExecution mojoExecution = new MojoExecution(p, "test-javadoc", null);
- setVariableValueToObject(mojo, "mojo", mojoExec);
+ setVariableValueToObject(mojo, "mojoExecution", mojoExecution);
MavenProject currentProject = new MavenProjectStub();
currentProject.setGroupId("GROUPID");
diff --git a/src/test/resources/unit/validate-options-test/wrong-locale-test-plugin-config.xml b/src/test/resources/unit/validate-options-test/wrong-locale-test-plugin-config.xml
deleted file mode 100644
index f8c564af..00000000
--- a/src/test/resources/unit/validate-options-test/wrong-locale-test-plugin-config.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId>
- <artifactId>wrong-locale-options-test</artifactId>
- <packaging>jar</packaging>
- <version>1.0-SNAPSHOT</version>
- <inceptionYear>2007</inceptionYear>
- <name>Maven Javadoc Plugin wrong locale Test</name>
- <url>http://maven.apache.org</url>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <project implementation="org.apache.maven.plugins.javadoc.stubs.WrongEncodingOptionsTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/validate-options-test/target/site/apidocs</outputDirectory>
- <javadocOptionsDir>${basedir}/target/test/unit/validate-options-test/target/javadoc-bundle-options</javadocOptionsDir>
- <show>protected</show>
- <groups/>
- <tags/>
- <quiet>true</quiet>
- <debug>true</debug>
- <locale>wrong_wrong_wrong_wrong</locale>
- <stylesheet>java</stylesheet>
- <failOnError>true</failOnError>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
(maven-javadoc-plugin) 02/02: Align plugin with AbstractMavenReport
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch doxia-2.0.0
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git
commit 99d4d6466621705695a883c6b3c6370ec4c93e6d
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Nov 19 12:34:38 2023 +0100
Align plugin with AbstractMavenReport
---
pom.xml | 7 ++
src/it/projects/MJAVADOC-320/verify.groovy | 96 ++++++++--------
.../MJAVADOC-506_excl-module-info/verify.groovy | 8 +-
.../verify.groovy | 4 +-
.../MJAVADOC-575_source8-module-info/verify.groovy | 4 +-
src/it/projects/MJAVADOC-610_mrjar/verify.groovy | 4 +-
.../MJAVADOC-618_modular-war/verify.groovy | 6 +-
.../MJAVADOC-639_requires_ignored/verify.groovy | 18 +--
src/it/projects/MJAVADOC-769/pom.xml | 2 -
src/it/projects/MJAVADOC-770/verify.groovy | 2 +-
src/it/projects/dependencySource-1/verify.bsh | 102 ++++++++---------
src/it/projects/dependencySource-2/verify.bsh | 102 ++++++++---------
src/it/projects/dependencySource-3/verify.bsh | 102 ++++++++---------
src/it/projects/dependencySource-4/verify.bsh | 102 ++++++++---------
src/it/projects/reproducible/verify.groovy | 2 +-
.../maven/plugins/javadoc/AbstractJavadocMojo.java | 43 +++----
.../apache/maven/plugins/javadoc/JavadocJar.java | 51 +++------
.../maven/plugins/javadoc/JavadocReport.java | 96 ++++++----------
.../maven/plugins/javadoc/ResourcesBundleMojo.java | 7 +-
.../maven/plugins/javadoc/TestJavadocJar.java | 12 --
.../maven/plugins/javadoc/TestJavadocReport.java | 59 +---------
.../maven/plugins/javadoc/JavadocJarTest.java | 19 ----
.../maven/plugins/javadoc/JavadocReportTest.java | 8 +-
.../all/pom.xml | 124 ++++++++++-----------
.../aggregate-resources-test-plugin-config.xml | 2 +-
.../aggregate-test-plugin-config.xml | 2 +-
.../custom-configuration-plugin-config.xml | 2 +-
.../default-configuration-plugin-config.xml | 2 +-
.../docfiles-test/docfiles-test-plugin-config.xml | 2 +-
.../docfiles-with-java-test-plugin-config.xml | 2 +-
.../doclet-path-test-plugin-config.xml | 2 +-
.../unit/doclet-test/doclet-test-plugin-config.xml | 2 +-
.../file-include-exclude-plugin-config.xml | 2 +-
.../header-footer-test-plugin-config.xml | 2 +-
.../1.0-SNAPSHOT/helpfile-test-1.0-SNAPSHOT.pom | 2 +-
src/test/resources/unit/helpfile-test/pom.xml | 2 +-
.../javaHome-test/javaHome-test-plugin-config.xml | 2 +-
.../javadocjar-archive-config.xml | 2 +-
.../javadocjar-default-plugin-config.xml | 2 +-
.../javadocjar-failonerror-plugin-config.xml | 2 +-
.../javadocjar-invalid-destdir-plugin-config.xml | 77 -------------
.../javadocjar/invalid/destdir/App.java | 50 ---------
.../javadocjar/invalid/destdir/AppSample.java | 45 --------
.../unit/jdk5-test/jdk5-test-plugin-config.xml | 2 +-
.../unit/jdk6-test/jdk6-test-plugin-config.xml | 2 +-
.../newline-test/newline-test-plugin-config.xml | 2 +-
.../optionsumlautencoding-test-plugin-config.xml | 2 +-
.../unit/pom-test/pom-test-plugin-config.xml | 2 +-
.../unit/proxy-test/proxy-test-plugin-config.xml | 2 +-
.../quotedpath-test-plugin-config.xml | 2 +-
.../resources-test-plugin-config.xml | 2 +-
.../resources-with-excludes-test-plugin-config.xml | 2 +-
.../unit/stale-test/stale-test-plugin-config.xml | 2 +-
.../stylesheetfile-test-1.0-SNAPSHOT.pom | 2 +-
.../resources/unit/stylesheetfile-test/pom.xml | 2 +-
.../subpackages-test-plugin-config.xml | 2 +-
.../unit/tag-test/tag-test-plugin-config.xml | 2 +-
.../unit/taglet-test/taglet-test-plugin-config.xml | 2 +-
.../tagletArtifacts-test-plugin-config.xml | 2 +-
.../test-javadoc-test-plugin-config.xml | 2 +-
.../conflict-options-test-plugin-config.xml | 2 +-
.../wrong-charset-test-plugin-config.xml | 2 +-
.../wrong-docencoding-test-plugin-config.xml | 2 +-
.../wrong-encoding-test-plugin-config.xml | 2 +-
...rong-locale-with-variant-test-plugin-config.xml | 2 +-
65 files changed, 471 insertions(+), 757 deletions(-)
diff --git a/pom.xml b/pom.xml
index 44fee50c..0c404613 100644
--- a/pom.xml
+++ b/pom.xml
@@ -210,6 +210,13 @@ under the License.
<artifactId>maven-reporting-api</artifactId>
<version>4.0.0-M8</version>
</dependency>
+ <!-- for Javaodc purposes -->
+ <dependency>
+ <groupId>org.apache.maven.reporting</groupId>
+ <artifactId>maven-reporting-impl</artifactId>
+ <version>4.0.0-M11</version>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-archiver</artifactId>
diff --git a/src/it/projects/MJAVADOC-320/verify.groovy b/src/it/projects/MJAVADOC-320/verify.groovy
index d9375a34..7df00534 100644
--- a/src/it/projects/MJAVADOC-320/verify.groovy
+++ b/src/it/projects/MJAVADOC-320/verify.groovy
@@ -1,48 +1,48 @@
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-File target = new File( basedir, "module2/target" );
-assert target.exists()
-assert target.isDirectory()
-
-File apidocs = new File( target, "apidocs" );
-assert apidocs.exists()
-assert apidocs.isDirectory()
-
-// module3 must be included
-File module3File = new File( apidocs, "org/apache/maven/plugin/javadoc/it/Module3Class.html" );
-assert module3File.exists()
-assert module3File.isFile()
-
-// el-api must be included
-File elApiFile = new File( apidocs, "javax/el/ValueExpression.html" );
-assert elApiFile.exists()
-assert elApiFile.isFile()
-
-// module1 must NOT be included
-File module1File = new File( apidocs, "org/apache/maven/plugin/javadoc/it/Module1Class.html" );
-assert !module1File.exists()
-assert !module1File.isFile()
-
-// servlet-api must NOT be included
-File servletSpecFile = new File( apidocs, "javax/servlet/ServletContext.html" );
-assert !servletSpecFile.exists()
-assert !servletSpecFile.isFile()
-
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+File target = new File( basedir, "module2/target" );
+assert target.exists()
+assert target.isDirectory()
+
+File apidocs = new File( target, "site/apidocs" );
+assert apidocs.exists()
+assert apidocs.isDirectory()
+
+// module3 must be included
+File module3File = new File( apidocs, "org/apache/maven/plugin/javadoc/it/Module3Class.html" );
+assert module3File.exists()
+assert module3File.isFile()
+
+// el-api must be included
+File elApiFile = new File( apidocs, "javax/el/ValueExpression.html" );
+assert elApiFile.exists()
+assert elApiFile.isFile()
+
+// module1 must NOT be included
+File module1File = new File( apidocs, "org/apache/maven/plugin/javadoc/it/Module1Class.html" );
+assert !module1File.exists()
+assert !module1File.isFile()
+
+// servlet-api must NOT be included
+File servletSpecFile = new File( apidocs, "javax/servlet/ServletContext.html" );
+assert !servletSpecFile.exists()
+assert !servletSpecFile.isFile()
+
diff --git a/src/it/projects/MJAVADOC-506_excl-module-info/verify.groovy b/src/it/projects/MJAVADOC-506_excl-module-info/verify.groovy
index 3a870ed3..4151588d 100644
--- a/src/it/projects/MJAVADOC-506_excl-module-info/verify.groovy
+++ b/src/it/projects/MJAVADOC-506_excl-module-info/verify.groovy
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+
def javaVersion = System.getProperty( "java.specification.version" )
if ( javaVersion =~ /(1\..+)|9|10/ ) {
- assert new File( basedir, 'target/apidocs/com/foo/MyClass.html').exists()
+ assert new File( basedir, 'target/site/apidocs/com/foo/MyClass.html').exists()
} else {
- assert new File( basedir, 'target/apidocs/M.N/com/foo/MyClass.html').exists()
-}
+ assert new File( basedir, 'target/site/apidocs/M.N/com/foo/MyClass.html').exists()
+}
diff --git a/src/it/projects/MJAVADOC-555_link-automatic-modules/verify.groovy b/src/it/projects/MJAVADOC-555_link-automatic-modules/verify.groovy
index ad6c4621..8c5a23e6 100644
--- a/src/it/projects/MJAVADOC-555_link-automatic-modules/verify.groovy
+++ b/src/it/projects/MJAVADOC-555_link-automatic-modules/verify.groovy
@@ -20,9 +20,9 @@
def classFile
int javaVersion = System.getProperty( "java.specification.version" ) as Integer
if ( javaVersion >= 11 ) {
- classFile = new File( basedir, 'target/apidocs/jul_to_slf4j/com/testcase/Testcase.html')
+ classFile = new File( basedir, 'target/site/apidocs/jul_to_slf4j/com/testcase/Testcase.html')
} else {
- classFile = new File( basedir, 'target/apidocs/com/testcase/Testcase.html')
+ classFile = new File( basedir, 'target/site/apidocs/com/testcase/Testcase.html')
}
assert classFile.exists() : "Can't locate ${classFile}"
diff --git a/src/it/projects/MJAVADOC-575_source8-module-info/verify.groovy b/src/it/projects/MJAVADOC-575_source8-module-info/verify.groovy
index a38349a0..88d201a8 100644
--- a/src/it/projects/MJAVADOC-575_source8-module-info/verify.groovy
+++ b/src/it/projects/MJAVADOC-575_source8-module-info/verify.groovy
@@ -16,5 +16,5 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-assert new File( basedir, 'target/apidocs/com/foo/MyClass.html').exists()
+
+assert new File( basedir, 'target/site/apidocs/com/foo/MyClass.html').exists()
diff --git a/src/it/projects/MJAVADOC-610_mrjar/verify.groovy b/src/it/projects/MJAVADOC-610_mrjar/verify.groovy
index bbed8f9e..3bb1fe0e 100644
--- a/src/it/projects/MJAVADOC-610_mrjar/verify.groovy
+++ b/src/it/projects/MJAVADOC-610_mrjar/verify.groovy
@@ -20,5 +20,5 @@
def file = new File( basedir, 'target/mjavadoc610-1.0-SNAPSHOT-javadoc.jar' )
assert file.exists()
-assert new File( basedir, 'target/apidocs/com.foo/com/foo/MyClass.html').exists()
-assert new File( basedir, 'target/apidocs/com.foo/com/foo/OtherClass.html').exists()
+assert new File( basedir, 'target/site/apidocs/com.foo/com/foo/MyClass.html').exists()
+assert new File( basedir, 'target/site/apidocs/com.foo/com/foo/OtherClass.html').exists()
diff --git a/src/it/projects/MJAVADOC-618_modular-war/verify.groovy b/src/it/projects/MJAVADOC-618_modular-war/verify.groovy
index d665081d..9b8fb2fa 100644
--- a/src/it/projects/MJAVADOC-618_modular-war/verify.groovy
+++ b/src/it/projects/MJAVADOC-618_modular-war/verify.groovy
@@ -17,7 +17,7 @@
* under the License.
*/
-assert new File( basedir, 'target/apidocs/argfile').readLines().size() == 2
-assert new File( basedir, 'target/apidocs/com.mycompany.lib/com/mycompany/lib/Library.html').exists()
+assert new File( basedir, 'target/site/apidocs/argfile').readLines().size() == 2
+assert new File( basedir, 'target/site/apidocs/com.mycompany.lib/com/mycompany/lib/Library.html').exists()
// module descriptor of com.mycompany.app has no exports, so nothing is documented
-assert !new File( basedir, 'target/apidocs/com.mycompany.app/com/mycompany/app/Application.html').exists()
+assert !new File( basedir, 'target/site/apidocs/com.mycompany.app/com/mycompany/app/Application.html').exists()
diff --git a/src/it/projects/MJAVADOC-639_requires_ignored/verify.groovy b/src/it/projects/MJAVADOC-639_requires_ignored/verify.groovy
index 3cb9637c..d1007fbc 100644
--- a/src/it/projects/MJAVADOC-639_requires_ignored/verify.groovy
+++ b/src/it/projects/MJAVADOC-639_requires_ignored/verify.groovy
@@ -19,25 +19,25 @@ import java.util.jar.JarFile
* specific language governing permissions and limitations
* under the License.
*/
-
+
int javaVersion = System.getProperty( "java.specification.version" ) as Integer
if ( javaVersion >= 11 ) {
- def index = new File( basedir, 'target/apidocs/index.html')
+ def index = new File( basedir, 'target/site/apidocs/index.html')
assert index.text =~ /<a href="modulea\/module-summary\.html">modulea<\/a>/
assert index.text =~ /<a href="moduleb\/module-summary\.html">moduleb<\/a>/
-
- assert new File( basedir, 'target/apidocs/modulea/module-summary.html').exists()
- assert new File( basedir, 'target/apidocs/moduleb/module-summary.html').exists()
-}
+
+ assert new File( basedir, 'target/site/apidocs/modulea/module-summary.html').exists()
+ assert new File( basedir, 'target/site/apidocs/moduleb/module-summary.html').exists()
+}
else {
def overview = new File( basedir, 'target/site/apidocs/overview-summary.html')
assert overview.text =~ /<a href="modulea-summary.html">modulea<\/a>/
assert overview.text =~ /<a href="moduleb-summary.html">moduleb<\/a>/
-
- assert new File( basedir, 'target/site/apidocs/modulea-summary.html').exists()
- assert new File( basedir, 'target/site/apidocs/moduleb-summary.html').exists()
+
+ assert new File( basedir, 'target/site/site/apidocs/modulea-summary.html').exists()
+ assert new File( basedir, 'target/site/site/apidocs/moduleb-summary.html').exists()
}
def aggregate = new File(basedir, 'target/MJAVADOC-639-1.0.0-SNAPSHOT-javadoc.jar')
diff --git a/src/it/projects/MJAVADOC-769/pom.xml b/src/it/projects/MJAVADOC-769/pom.xml
index b959e06c..ce95bb14 100644
--- a/src/it/projects/MJAVADOC-769/pom.xml
+++ b/src/it/projects/MJAVADOC-769/pom.xml
@@ -93,8 +93,6 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>@project.version@</version>
<configuration>
- <outputDirectory>${project.build.directory}/apidocs
- </outputDirectory>
<release>11</release>
<nodeprecated>false</nodeprecated>
<author>false</author>
diff --git a/src/it/projects/MJAVADOC-770/verify.groovy b/src/it/projects/MJAVADOC-770/verify.groovy
index 165abb14..933b06e5 100644
--- a/src/it/projects/MJAVADOC-770/verify.groovy
+++ b/src/it/projects/MJAVADOC-770/verify.groovy
@@ -18,6 +18,6 @@
*/
// new style javadoc has a module summary. legacy mode has not.
-def moduleFile = new File( basedir, 'target/apidocs/mjavadoc770/module-summary.html')
+def moduleFile = new File( basedir, 'target/site/apidocs/mjavadoc770/module-summary.html')
assert !moduleFile.exists()
diff --git a/src/it/projects/dependencySource-1/verify.bsh b/src/it/projects/dependencySource-1/verify.bsh
index af443a82..841288c5 100644
--- a/src/it/projects/dependencySource-1/verify.bsh
+++ b/src/it/projects/dependencySource-1/verify.bsh
@@ -1,51 +1,51 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-
-File distroTarget = new File( basedir, "MJAVADOC-280-1-distro/target" );
-File apidocs = new File( distroTarget, "apidocs" );
-File testApidocs = new File( distroTarget, "testapidocs" );
-
-File f;
-if ( !( f = new File( apidocs, "org/apache/maven/plugins/mjavadoc/it/moda/App.html" ) ).exists() )
-{
- System.out.println( f + " does not exist!" );
- return false;
-}
-
-if ( !( f = new File( apidocs, "org/apache/maven/plugins/mjavadoc/it/modb/App.html" ) ).exists() )
-{
- System.out.println( f + " does not exist!" );
- return false;
-}
-
-if ( !( f = new File( testApidocs, "org/apache/maven/plugins/mjavadoc/it/moda/AppTest.html" ) ).exists() )
-{
- System.out.println( f + " does not exist!" );
- return false;
-}
-
-if ( !( f = new File( testApidocs, "org/apache/maven/plugins/mjavadoc/it/modb/AppTest.html" ) ).exists() )
-{
- System.out.println( f + " does not exist!" );
- return false;
-}
-
-return true;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+
+File distroTarget = new File( basedir, "MJAVADOC-280-1-distro/target/site" );
+File apidocs = new File( distroTarget, "apidocs" );
+File testApidocs = new File( distroTarget, "testapidocs" );
+
+File f;
+if ( !( f = new File( apidocs, "org/apache/maven/plugins/mjavadoc/it/moda/App.html" ) ).exists() )
+{
+ System.out.println( f + " does not exist!" );
+ return false;
+}
+
+if ( !( f = new File( apidocs, "org/apache/maven/plugins/mjavadoc/it/modb/App.html" ) ).exists() )
+{
+ System.out.println( f + " does not exist!" );
+ return false;
+}
+
+if ( !( f = new File( testApidocs, "org/apache/maven/plugins/mjavadoc/it/moda/AppTest.html" ) ).exists() )
+{
+ System.out.println( f + " does not exist!" );
+ return false;
+}
+
+if ( !( f = new File( testApidocs, "org/apache/maven/plugins/mjavadoc/it/modb/AppTest.html" ) ).exists() )
+{
+ System.out.println( f + " does not exist!" );
+ return false;
+}
+
+return true;
diff --git a/src/it/projects/dependencySource-2/verify.bsh b/src/it/projects/dependencySource-2/verify.bsh
index e5b9af41..a600f94f 100644
--- a/src/it/projects/dependencySource-2/verify.bsh
+++ b/src/it/projects/dependencySource-2/verify.bsh
@@ -1,51 +1,51 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-
-File distroTarget = new File( basedir, "MJAVADOC-280-2-distro/target" );
-File apidocs = new File( distroTarget, "apidocs" );
-File testApidocs = new File( distroTarget, "testapidocs" );
-
-File f;
-if ( !( f = new File( apidocs, "org/apache/maven/plugins/mjavadoc/it/moda/App.html" ) ).exists() )
-{
- System.out.println( f + " does not exist!" );
- return false;
-}
-
-if ( !( f = new File( apidocs, "org/apache/maven/plugins/mjavadoc/it/modb/App.html" ) ).exists() )
-{
- System.out.println( f + " does not exist!" );
- return false;
-}
-
-if ( !( f = new File( testApidocs, "org/apache/maven/plugins/mjavadoc/it/moda/AppTest.html" ) ).exists() )
-{
- System.out.println( f + " does not exist!" );
- return false;
-}
-
-if ( !( f = new File( testApidocs, "org/apache/maven/plugins/mjavadoc/it/modb/AppTest.html" ) ).exists() )
-{
- System.out.println( f + " does not exist!" );
- return false;
-}
-
-return true;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+
+File distroTarget = new File( basedir, "MJAVADOC-280-2-distro/target/site" );
+File apidocs = new File( distroTarget, "apidocs" );
+File testApidocs = new File( distroTarget, "testapidocs" );
+
+File f;
+if ( !( f = new File( apidocs, "org/apache/maven/plugins/mjavadoc/it/moda/App.html" ) ).exists() )
+{
+ System.out.println( f + " does not exist!" );
+ return false;
+}
+
+if ( !( f = new File( apidocs, "org/apache/maven/plugins/mjavadoc/it/modb/App.html" ) ).exists() )
+{
+ System.out.println( f + " does not exist!" );
+ return false;
+}
+
+if ( !( f = new File( testApidocs, "org/apache/maven/plugins/mjavadoc/it/moda/AppTest.html" ) ).exists() )
+{
+ System.out.println( f + " does not exist!" );
+ return false;
+}
+
+if ( !( f = new File( testApidocs, "org/apache/maven/plugins/mjavadoc/it/modb/AppTest.html" ) ).exists() )
+{
+ System.out.println( f + " does not exist!" );
+ return false;
+}
+
+return true;
diff --git a/src/it/projects/dependencySource-3/verify.bsh b/src/it/projects/dependencySource-3/verify.bsh
index 4266397b..60add4ad 100644
--- a/src/it/projects/dependencySource-3/verify.bsh
+++ b/src/it/projects/dependencySource-3/verify.bsh
@@ -1,51 +1,51 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-
-File distroTarget = new File( basedir, "MJAVADOC-280-3-distro/target" );
-File apidocs = new File( distroTarget, "apidocs" );
-File testApidocs = new File( distroTarget, "testapidocs" );
-
-File f;
-if ( !( f = new File( apidocs, "org/apache/maven/plugins/mjavadoc/it/moda/App.html" ) ).exists() )
-{
- System.out.println( f + " does not exist!" );
- return false;
-}
-
-if ( !( f = new File( apidocs, "org/apache/maven/plugins/mjavadoc/it/modb/App.html" ) ).exists() )
-{
- System.out.println( f + " does not exist!" );
- return false;
-}
-
-if ( !( f = new File( testApidocs, "org/apache/maven/plugins/mjavadoc/it/moda/AppTest.html" ) ).exists() )
-{
- System.out.println( f + " does not exist!" );
- return false;
-}
-
-if ( !( f = new File( testApidocs, "org/apache/maven/plugins/mjavadoc/it/modb/AppTest.html" ) ).exists() )
-{
- System.out.println( f + " does not exist!" );
- return false;
-}
-
-return true;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+
+File distroTarget = new File( basedir, "MJAVADOC-280-3-distro/target/site" );
+File apidocs = new File( distroTarget, "apidocs" );
+File testApidocs = new File( distroTarget, "testapidocs" );
+
+File f;
+if ( !( f = new File( apidocs, "org/apache/maven/plugins/mjavadoc/it/moda/App.html" ) ).exists() )
+{
+ System.out.println( f + " does not exist!" );
+ return false;
+}
+
+if ( !( f = new File( apidocs, "org/apache/maven/plugins/mjavadoc/it/modb/App.html" ) ).exists() )
+{
+ System.out.println( f + " does not exist!" );
+ return false;
+}
+
+if ( !( f = new File( testApidocs, "org/apache/maven/plugins/mjavadoc/it/moda/AppTest.html" ) ).exists() )
+{
+ System.out.println( f + " does not exist!" );
+ return false;
+}
+
+if ( !( f = new File( testApidocs, "org/apache/maven/plugins/mjavadoc/it/modb/AppTest.html" ) ).exists() )
+{
+ System.out.println( f + " does not exist!" );
+ return false;
+}
+
+return true;
diff --git a/src/it/projects/dependencySource-4/verify.bsh b/src/it/projects/dependencySource-4/verify.bsh
index 4216b3e2..1bc91ee3 100644
--- a/src/it/projects/dependencySource-4/verify.bsh
+++ b/src/it/projects/dependencySource-4/verify.bsh
@@ -1,51 +1,51 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-
-File distroTarget = new File( basedir, "MJAVADOC-280-4-distro/target" );
-File apidocs = new File( distroTarget, "apidocs" );
-File testApidocs = new File( distroTarget, "testapidocs" );
-
-File f;
-if ( !( f = new File( apidocs, "org/apache/maven/plugins/mjavadoc/it/moda/App.html" ) ).exists() )
-{
- System.out.println( f + " does not exist!" );
- return false;
-}
-
-if ( !( f = new File( apidocs, "org/apache/maven/plugins/mjavadoc/it/modb/App.html" ) ).exists() )
-{
- System.out.println( f + " does not exist!" );
- return false;
-}
-
-if ( !( f = new File( testApidocs, "org/apache/maven/plugins/mjavadoc/it/moda/AppTest.html" ) ).exists() )
-{
- System.out.println( f + " does not exist!" );
- return false;
-}
-
-if ( !( f = new File( testApidocs, "org/apache/maven/plugins/mjavadoc/it/modb/AppTest.html" ) ).exists() )
-{
- System.out.println( f + " does not exist!" );
- return false;
-}
-
-return true;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+
+File distroTarget = new File( basedir, "MJAVADOC-280-4-distro/target/site" );
+File apidocs = new File( distroTarget, "apidocs" );
+File testApidocs = new File( distroTarget, "testapidocs" );
+
+File f;
+if ( !( f = new File( apidocs, "org/apache/maven/plugins/mjavadoc/it/moda/App.html" ) ).exists() )
+{
+ System.out.println( f + " does not exist!" );
+ return false;
+}
+
+if ( !( f = new File( apidocs, "org/apache/maven/plugins/mjavadoc/it/modb/App.html" ) ).exists() )
+{
+ System.out.println( f + " does not exist!" );
+ return false;
+}
+
+if ( !( f = new File( testApidocs, "org/apache/maven/plugins/mjavadoc/it/moda/AppTest.html" ) ).exists() )
+{
+ System.out.println( f + " does not exist!" );
+ return false;
+}
+
+if ( !( f = new File( testApidocs, "org/apache/maven/plugins/mjavadoc/it/modb/AppTest.html" ) ).exists() )
+{
+ System.out.println( f + " does not exist!" );
+ return false;
+}
+
+return true;
diff --git a/src/it/projects/reproducible/verify.groovy b/src/it/projects/reproducible/verify.groovy
index 3033be71..47771b45 100644
--- a/src/it/projects/reproducible/verify.groovy
+++ b/src/it/projects/reproducible/verify.groovy
@@ -24,7 +24,7 @@ import java.util.jar.*;
def target = new File( basedir, 'target' )
assert target.isDirectory()
-def apidocs = new File( target, 'apidocs' )
+def apidocs = new File( target, 'site/apidocs' )
assert apidocs.isDirectory()
def options = new File( apidocs, 'options' )
diff --git a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
index e7028345..a7ec9e17 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
@@ -1218,14 +1218,15 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
private OfflineLink[] offlineLinks;
/**
- * Specifies the destination directory where javadoc saves the generated HTML files.
+ * The shared output directory for the report where Javadoc saves the generated HTML files.
+ * Note that this parameter is only evaluated if the goal is run directly from the command line.
+ * If the goal is run indirectly as part of a site generation, the shared output directory configured in the
+ * <a href="https://maven.apache.org/plugins/maven-site-plugin/site-mojo.html#outputDirectory">Maven Site Plugin</a>
+ * is used instead.
+ * @see org.apache.maven.reporting.AbstractMavenReport#outputDirectory
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#additional-options-provided-by-the-standard-doclet">Doclet option d</a>
*/
- @Parameter(
- property = "destDir",
- alias = "destDir",
- defaultValue = "${project.build.directory}/apidocs",
- required = true)
+ @Parameter(defaultValue = "${project.reporting.outputDirectory}", readonly = true, required = true)
protected File outputDirectory;
/**
@@ -1684,11 +1685,18 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
return false;
}
+ protected String getOutputDirectory() {
+ return outputDirectory.getAbsolutePath();
+ }
+
/**
- * @return the output directory
+ * Method that returns the plugin report output directory where the generated Javadoc report will be put
+ * beneath {@link #getOutputDirectory()}/{@link org.apache.maven.reporting.AbstractMavenReport#getReportOutputDirectory()}.
+ *
+ * @return a String that contains the target directory
*/
- protected String getOutputDirectory() {
- return outputDirectory.getAbsoluteFile().toString();
+ protected String getPluginReportOutputDirectory() {
+ return getOutputDirectory() + "/" + (isTest() ? "test" : "") + "apidocs";
}
protected MavenProject getProject() {
@@ -1832,7 +1840,7 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
doExecute();
}
- abstract void doExecute() throws MojoExecutionException, MojoFailureException;
+ protected abstract void doExecute() throws MojoExecutionException, MojoFailureException;
protected final void verifyRemovedParameter(String paramName) {
Xpp3Dom configDom = mojoExecution.getConfiguration();
@@ -1862,11 +1870,6 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
* @throws MavenReportException if any
*/
protected void executeReport(Locale unusedLocale) throws MavenReportException {
- if (skip) {
- getLog().info("Skipping javadoc generation");
- return;
- }
-
if (getLog().isDebugEnabled()) {
this.debug = true;
}
@@ -1912,12 +1915,12 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
// Javadoc output directory as File
// ----------------------------------------------------------------------
- File javadocOutputDirectory = new File(getOutputDirectory());
+ File javadocOutputDirectory = new File(getPluginReportOutputDirectory());
if (javadocOutputDirectory.exists() && !javadocOutputDirectory.isDirectory()) {
- throw new MavenReportException("IOException: " + getOutputDirectory() + " is not a directory.");
+ throw new MavenReportException("IOException: " + javadocOutputDirectory + " is not a directory.");
}
if (javadocOutputDirectory.exists() && !javadocOutputDirectory.canWrite()) {
- throw new MavenReportException("IOException: " + getOutputDirectory() + " is not writable.");
+ throw new MavenReportException("IOException: " + javadocOutputDirectory + " is not writable.");
}
javadocOutputDirectory.mkdirs();
@@ -5436,7 +5439,7 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
}
List<OfflineLink> modulesLinks = new ArrayList<>();
- String javadocDirRelative = PathUtils.toRelative(project.getBasedir(), getOutputDirectory());
+ String javadocDirRelative = PathUtils.toRelative(project.getBasedir(), getPluginReportOutputDirectory());
for (MavenProject p : aggregatedProjects) {
if (!dependencyArtifactIds.contains(p.getArtifact().getId()) || (p.getUrl() == null)) {
continue;
@@ -5729,7 +5732,7 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
// links can be relative paths or files
File dir = new File(link);
if (!dir.isAbsolute()) {
- dir = new File(getOutputDirectory(), link);
+ dir = new File(getPluginReportOutputDirectory(), link);
}
if (!dir.isDirectory()) {
if (detecting) {
diff --git a/src/main/java/org/apache/maven/plugins/javadoc/JavadocJar.java b/src/main/java/org/apache/maven/plugins/javadoc/JavadocJar.java
index 98bed568..c1a03eca 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/JavadocJar.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/JavadocJar.java
@@ -94,15 +94,6 @@ public class JavadocJar extends AbstractJavadocMojo {
// Mojo Parameters
// ----------------------------------------------------------------------
- /**
- * Specifies the destination directory where javadoc saves the generated HTML files.
- * @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#standard-doclet-options">Doclet option d</a>.
- * @deprecated
- */
- @Deprecated
- @Parameter(property = "destDir")
- private File destDir;
-
/**
* Specifies the directory where the generated jar file will be put.
*/
@@ -158,17 +149,12 @@ public class JavadocJar extends AbstractJavadocMojo {
/** {@inheritDoc} */
@Override
- public void doExecute() throws MojoExecutionException {
+ protected void doExecute() throws MojoExecutionException {
if (skip) {
getLog().info("Skipping javadoc generation");
return;
}
- File innerDestDir = this.destDir;
- if (innerDestDir == null) {
- innerDestDir = new File(getOutputDirectory());
- }
-
if (!isAggregator() || !"pom".equalsIgnoreCase(project.getPackaging())) {
ArtifactHandler artifactHandler = project.getArtifact().getArtifactHandler();
if (!"java".equals(artifactHandler.getLanguage())) {
@@ -185,25 +171,24 @@ public class JavadocJar extends AbstractJavadocMojo {
failOnError("RuntimeException: Error while generating Javadoc", e);
}
- if (innerDestDir.exists()) {
- try {
- File outputFile = generateArchive(innerDestDir, finalName + "-" + getClassifier() + ".jar");
-
- if (!attach) {
- getLog().info("NOT adding javadoc to attached artifacts list.");
- } else {
- // TODO: these introduced dependencies on the project are going to become problematic - can we
- // export it
- // through metadata instead?
- projectHelper.attachArtifact(project, "javadoc", getClassifier(), outputFile);
- }
- } catch (ArchiverException e) {
- failOnError("ArchiverException: Error while creating archive", e);
- } catch (IOException e) {
- failOnError("IOException: Error while creating archive", e);
- } catch (RuntimeException e) {
- failOnError("RuntimeException: Error while creating archive", e);
+ try {
+ File outputFile = generateArchive(
+ new File(getPluginReportOutputDirectory()), finalName + "-" + getClassifier() + ".jar");
+
+ if (!attach) {
+ getLog().info("NOT adding javadoc to attached artifacts list.");
+ } else {
+ // TODO: these introduced dependencies on the project are going to become problematic - can we
+ // export it
+ // through metadata instead?
+ projectHelper.attachArtifact(project, "javadoc", getClassifier(), outputFile);
}
+ } catch (ArchiverException e) {
+ failOnError("ArchiverException: Error while creating archive", e);
+ } catch (IOException e) {
+ failOnError("IOException: Error while creating archive", e);
+ } catch (RuntimeException e) {
+ failOnError("RuntimeException: Error while creating archive", e);
}
}
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 b5058fcc..5c0ca5b1 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/JavadocReport.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/JavadocReport.java
@@ -57,24 +57,9 @@ public class JavadocReport extends AbstractJavadocMojo implements MavenMultiPage
// Report Mojo Parameters
// ----------------------------------------------------------------------
- /**
- * Specifies the destination directory where javadoc saves the generated HTML files.
- */
- @Parameter(
- property = "reportOutputDirectory",
- defaultValue = "${project.reporting.outputDirectory}/apidocs",
- required = true)
+ /** The current shared report output directory to use */
private File reportOutputDirectory;
- /**
- * The name of the destination directory.
- * <br/>
- *
- * @since 2.1
- */
- @Parameter(property = "destDir", defaultValue = "apidocs")
- private String destDir;
-
/**
* The name of the Javadoc report to be displayed in the Maven Generated Reports page
* (i.e. <code>project-reports.html</code>).
@@ -125,8 +110,6 @@ public class JavadocReport extends AbstractJavadocMojo implements MavenMultiPage
/** {@inheritDoc} */
@Override
public void generate(Sink sink, SinkFactory sinkFactory, Locale locale) throws MavenReportException {
- outputDirectory = getReportOutputDirectory();
-
try {
executeReport(locale);
} catch (MavenReportException | RuntimeException e) {
@@ -140,7 +123,7 @@ public class JavadocReport extends AbstractJavadocMojo implements MavenMultiPage
/** {@inheritDoc} */
@Override
public String getOutputName() {
- return destDir + "/index";
+ return (isTest() ? "test" : "") + "apidocs" + "/index";
}
/** {@inheritDoc} */
@@ -214,25 +197,23 @@ public class JavadocReport extends AbstractJavadocMojo implements MavenMultiPage
* </table>
*/
@Override
- public boolean canGenerateReport() {
- boolean canGenerate = false;
-
- if (!skip && (this.isAggregator() || !"pom".equals(this.project.getPackaging()))) {
- Collection<Path> sourcePaths;
- Map<Path, Collection<String>> files;
- try {
- sourcePaths = getSourcePaths().stream()
- .flatMap(e -> e.getSourcePaths().stream())
- .collect(Collectors.toList());
- files = getFiles(sourcePaths);
- } catch (MavenReportException e) {
- getLog().error(e.getMessage(), e);
- return false;
- }
+ public boolean canGenerateReport() throws MavenReportException {
+ if (skip) {
+ return false;
+ }
+
+ Collection<JavadocModule> sourcePaths = getSourcePaths();
+
+ Collection<Path> collectedSourcePaths =
+ sourcePaths.stream().flatMap(e -> e.getSourcePaths().stream()).collect(Collectors.toList());
- canGenerate = canGenerateReport(files);
+ Map<Path, Collection<String>> files = getFiles(collectedSourcePaths);
+
+ if (!canGenerateReport(files)) {
+ return false;
}
- return canGenerate;
+
+ return true;
}
/** {@inheritDoc} */
@@ -245,43 +226,38 @@ public class JavadocReport extends AbstractJavadocMojo implements MavenMultiPage
@Override
public File getReportOutputDirectory() {
if (reportOutputDirectory == null) {
- return outputDirectory;
+ reportOutputDirectory = new File(getOutputDirectory());
}
return reportOutputDirectory;
}
- /**
- * Method to set the directory where the generated reports will be put
- *
- * @param reportOutputDirectory the directory file to be set
- */
+ /** {@inheritDoc} */
@Override
public void setReportOutputDirectory(File reportOutputDirectory) {
- updateReportOutputDirectory(reportOutputDirectory, destDir);
- }
-
- /**
- * @param theDestDir the destination directory
- */
- public void setDestDir(String theDestDir) {
- this.destDir = theDestDir;
- updateReportOutputDirectory(reportOutputDirectory, theDestDir);
+ this.reportOutputDirectory = reportOutputDirectory;
+ this.outputDirectory = reportOutputDirectory;
}
- private void updateReportOutputDirectory(File reportOutputDirectory, String destDir) {
- if (reportOutputDirectory != null
- && destDir != null
- && !reportOutputDirectory.getAbsolutePath().endsWith(destDir)) {
- this.reportOutputDirectory = new File(reportOutputDirectory, destDir);
- } else {
- this.reportOutputDirectory = reportOutputDirectory;
- }
+ /** {@inheritDoc} */
+ @Override
+ protected String getPluginReportOutputDirectory() {
+ return getReportOutputDirectory().getAbsolutePath() + "/" + (isTest() ? "test" : "") + "apidocs";
}
/** {@inheritDoc} */
@Override
- public void doExecute() throws MojoExecutionException, MojoFailureException {
+ protected void doExecute() throws MojoExecutionException, MojoFailureException {
+ try {
+ if (!canGenerateReport()) {
+ String reportMojoInfo = mojoExecution.getPlugin().getId() + ":" + mojoExecution.getGoal();
+ getLog().info("Skipping " + reportMojoInfo + " report goal");
+ return;
+ }
+ } catch (MavenReportException e) {
+ throw new MojoExecutionException("Failed to determine whether report can be generated", e);
+ }
+
File outputDirectory = new File(getOutputDirectory());
String filename = getOutputName() + ".html";
diff --git a/src/main/java/org/apache/maven/plugins/javadoc/ResourcesBundleMojo.java b/src/main/java/org/apache/maven/plugins/javadoc/ResourcesBundleMojo.java
index 60d7e08e..087fc61a 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/ResourcesBundleMojo.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/ResourcesBundleMojo.java
@@ -93,7 +93,12 @@ public class ResourcesBundleMojo extends AbstractJavadocMojo {
* @see org.apache.maven.plugin.Mojo#execute()
*/
@Override
- public void doExecute() throws MojoExecutionException, MojoFailureException {
+ protected void doExecute() throws MojoExecutionException, MojoFailureException {
+ if (skip) {
+ getLog().info("Skipping javadoc generation");
+ return;
+ }
+
try {
buildJavadocOptions();
} catch (IOException e) {
diff --git a/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocJar.java b/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocJar.java
index 3da91822..b486bd65 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocJar.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocJar.java
@@ -52,13 +52,6 @@ public class TestJavadocJar extends JavadocJar {
// Javadoc Options (should be inline with Javadoc options defined in TestJavadocReport)
// ----------------------------------------------------------------------
- /**
- * Specifies the destination directory where Javadoc saves the generated HTML files.
- * @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#standard-doclet-options">Doclet option d</a>.
- */
- @Parameter(defaultValue = "${project.build.directory}/testapidocs", required = true)
- private File outputDirectory;
-
/**
* Specifies the Test title to be placed near the top of the overview summary file.
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#standard-doclet-options">Doclet option doctitle</a>.
@@ -124,11 +117,6 @@ public class TestJavadocJar extends JavadocJar {
// Important Note: should be inline with methods defined in TestJavadocReport
// ----------------------------------------------------------------------
- @Override
- protected String getOutputDirectory() {
- return outputDirectory.getAbsoluteFile().toString();
- }
-
@Override
protected File getJavadocDirectory() {
return testJavadocDirectory;
diff --git a/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocReport.java b/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocReport.java
index c65085bf..63d1d659 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocReport.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocReport.java
@@ -92,22 +92,6 @@ public class TestJavadocReport extends JavadocReport {
// Mojo Parameters (should be inline with options defined in TestJavadocJar)
// ----------------------------------------------------------------------
- /**
- * Specifies the destination directory where test Javadoc saves the generated HTML files.
- */
- @Parameter(
- property = "reportTestOutputDirectory",
- defaultValue = "${project.reporting.outputDirectory}/testapidocs",
- required = true)
- private File reportOutputDirectory;
-
- /**
- * The name of the destination directory.
- * <br/>
- */
- @Parameter(property = "destDir", defaultValue = "testapidocs")
- private String destDir;
-
/**
* Specifies the Test Javadoc resources directory to be included in the Javadoc (i.e. package.html, images...).
* <br/>
@@ -171,46 +155,6 @@ public class TestJavadocReport extends JavadocReport {
return testDescription;
}
- @Override
- public String getOutputName() {
- return destDir + "/index";
- }
-
- @Override
- public File getReportOutputDirectory() {
- if (reportOutputDirectory == null) {
- return outputDirectory;
- }
-
- return reportOutputDirectory;
- }
-
- /**
- * Method to set the directory where the generated reports will be put
- *
- * @param reportOutputDirectory the directory file to be set
- */
- @Override
- public void setReportOutputDirectory(File reportOutputDirectory) {
- updateReportOutputDirectory(reportOutputDirectory, destDir);
- }
-
- @Override
- public void setDestDir(String destDir) {
- this.destDir = destDir;
- updateReportOutputDirectory(reportOutputDirectory, destDir);
- }
-
- private void updateReportOutputDirectory(File reportOutputDirectory, String destDir) {
- if (reportOutputDirectory != null
- && destDir != null
- && !reportOutputDirectory.getAbsolutePath().endsWith(destDir)) {
- this.reportOutputDirectory = new File(reportOutputDirectory, destDir);
- } else {
- this.reportOutputDirectory = reportOutputDirectory;
- }
- }
-
// ----------------------------------------------------------------------
// Protected methods
// Important Note: should be inline with methods defined in TestJavadocJar
@@ -298,8 +242,7 @@ public class TestJavadocReport extends JavadocReport {
links = new ArrayList<>();
}
- // TODO the prerequisite is that the main report is in apidocs
- File apidocs = new File(getReportOutputDirectory().getParentFile(), "apidocs");
+ File apidocs = new File(getReportOutputDirectory(), "apidocs");
if (apidocs.isDirectory() && !links.contains("../apidocs")) {
links.add("../apidocs");
}
diff --git a/src/test/java/org/apache/maven/plugins/javadoc/JavadocJarTest.java b/src/test/java/org/apache/maven/plugins/javadoc/JavadocJarTest.java
index 49719af3..82ed8cdd 100644
--- a/src/test/java/org/apache/maven/plugins/javadoc/JavadocJarTest.java
+++ b/src/test/java/org/apache/maven/plugins/javadoc/JavadocJarTest.java
@@ -135,25 +135,6 @@ public class JavadocJarTest extends AbstractMojoTestCase {
assertThat(generatedFile).exists();
}
- /**
- * Test when the specified destDir parameter has an invalid value
- *
- * @throws Exception if any
- */
- public void testInvalidDestdir() throws Exception {
- File testPom = new File(
- getBasedir(),
- "src/test/resources/unit/javadocjar-invalid-destdir/javadocjar-invalid-destdir-plugin-config.xml");
- JavadocJar mojo = lookupMojo(testPom);
- mojo.execute();
-
- // check if the javadoc jar file was generated
- File generatedFile = new File(
- getBasedir(),
- "target/test/unit/javadocjar-invalid-destdir/target/javadocjar-invalid-destdir-javadoc.jar");
- assertThat(generatedFile).doesNotExist();
- }
-
public void testContinueIfFailOnErrorIsFalse() throws Exception {
File testPom = new File(
getBasedir(),
diff --git a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
index cb282d07..85494ccc 100644
--- a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
@@ -505,7 +505,7 @@ public class JavadocReportTest extends AbstractMojoTestCase {
new File(getBasedir(), "target/test/unit/doclet-test/target/site/apidocs/graph.dot").toPath();
assertThat(generatedFile).exists();
- Path optionsFile = new File(mojo.getOutputDirectory(), "options").toPath();
+ Path optionsFile = new File(mojo.getPluginReportOutputDirectory(), "options").toPath();
assertThat(optionsFile).exists();
String options = readFile(optionsFile);
assertThat(options).contains("/target/local-repo/umlgraph/UMLGraph/2.1/UMLGraph-2.1.jar");
@@ -524,7 +524,7 @@ public class JavadocReportTest extends AbstractMojoTestCase {
generatedFile = new File(getBasedir(), "target/test/unit/doclet-test/target/site/apidocs/graph.dot").toPath();
assertThat(generatedFile).exists();
- optionsFile = new File(mojo.getOutputDirectory(), "options").toPath();
+ optionsFile = new File(mojo.getPluginReportOutputDirectory(), "options").toPath();
assertThat(optionsFile).exists();
options = readFile(optionsFile);
assertThat(options)
@@ -571,7 +571,7 @@ public class JavadocReportTest extends AbstractMojoTestCase {
JavadocReport mojo = lookupMojo(testPom);
mojo.execute();
- Path optionsFile = new File(mojo.getOutputDirectory(), "options").toPath();
+ Path optionsFile = new File(mojo.getPluginReportOutputDirectory(), "options").toPath();
assertThat(optionsFile).exists();
// check for a part of the window title
@@ -1096,7 +1096,7 @@ public class JavadocReportTest extends AbstractMojoTestCase {
setVariableValueToObject(mojo, "repoSession", repoSysSession);
mojo.execute();
- Path optionsFile = new File(mojo.getOutputDirectory(), "options").toPath();
+ Path optionsFile = new File(mojo.getPluginReportOutputDirectory(), "options").toPath();
assertThat(optionsFile).exists();
String options = readFile(optionsFile);
// count -taglet
diff --git a/src/test/resources/unit/aggregate-modules-not-in-subfolders-test/all/pom.xml b/src/test/resources/unit/aggregate-modules-not-in-subfolders-test/all/pom.xml
index 2d35f145..4001ac32 100644
--- a/src/test/resources/unit/aggregate-modules-not-in-subfolders-test/all/pom.xml
+++ b/src/test/resources/unit/aggregate-modules-not-in-subfolders-test/all/pom.xml
@@ -1,62 +1,62 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId>
- <artifactId>aggregate-modules-not-in-subfolders-test-resources-test</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <modules>
- <module>../project1</module>
- <module>../project2</module>
- </modules>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <encoding>ISO-8859-1</encoding>
- <project implementation="org.apache.maven.plugins.javadoc.stubs.AggregateNotInSubFolderTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/aggregate-modules-not-in-subfolders-test/target/site/apidocs</outputDirectory>
- <javadocOptionsDir>${basedir}/target/test/unit/aggregate-modules-not-in-subfolders-test/target/javadoc-bundle-options</javadocOptionsDir>
- <windowtitle>Maven Javadoc Plugin aggregate resources 1.0-SNAPSHOT API</windowtitle>
- <reactorProjects>
- <project implementation="org.apache.maven.plugins.javadoc.stubs.AggregateNotInSubFolderTestMavenProjectStub"/>
- <project implementation="org.apache.maven.plugins.javadoc.stubs.AggregateNotInSubFolderProject1TestMavenProjectStub"/>
- <project implementation="org.apache.maven.plugins.javadoc.stubs.AggregateNotInSubFolderProject2TestMavenProjectStub"/>
- </reactorProjects>
-
- <show>protected</show>
- <groups/>
- <tags/>
- <quiet>true</quiet>
- <javadocDirectory>${basedir}/src/test/resources/unit/aggregate-modules-not-in-subfolders-test/src/main/javadoc</javadocDirectory>
- <debug>true</debug>
- <docfilessubdirs>true</docfilessubdirs>
- <stylesheet>java</stylesheet>
- <failOnError>true</failOnError>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId>
+ <artifactId>aggregate-modules-not-in-subfolders-test-resources-test</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>../project1</module>
+ <module>../project2</module>
+ </modules>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <encoding>ISO-8859-1</encoding>
+ <project implementation="org.apache.maven.plugins.javadoc.stubs.AggregateNotInSubFolderTestMavenProjectStub"/>
+ <outputDirectory>${basedir}/target/test/unit/aggregate-modules-not-in-subfolders-test/target/site</outputDirectory>
+ <javadocOptionsDir>${basedir}/target/test/unit/aggregate-modules-not-in-subfolders-test/target/javadoc-bundle-options</javadocOptionsDir>
+ <windowtitle>Maven Javadoc Plugin aggregate resources 1.0-SNAPSHOT API</windowtitle>
+ <reactorProjects>
+ <project implementation="org.apache.maven.plugins.javadoc.stubs.AggregateNotInSubFolderTestMavenProjectStub"/>
+ <project implementation="org.apache.maven.plugins.javadoc.stubs.AggregateNotInSubFolderProject1TestMavenProjectStub"/>
+ <project implementation="org.apache.maven.plugins.javadoc.stubs.AggregateNotInSubFolderProject2TestMavenProjectStub"/>
+ </reactorProjects>
+
+ <show>protected</show>
+ <groups/>
+ <tags/>
+ <quiet>true</quiet>
+ <javadocDirectory>${basedir}/src/test/resources/unit/aggregate-modules-not-in-subfolders-test/src/main/javadoc</javadocDirectory>
+ <debug>true</debug>
+ <docfilessubdirs>true</docfilessubdirs>
+ <stylesheet>java</stylesheet>
+ <failOnError>true</failOnError>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/src/test/resources/unit/aggregate-resources-test/aggregate-resources-test-plugin-config.xml b/src/test/resources/unit/aggregate-resources-test/aggregate-resources-test-plugin-config.xml
index b85d1179..97367dc1 100644
--- a/src/test/resources/unit/aggregate-resources-test/aggregate-resources-test-plugin-config.xml
+++ b/src/test/resources/unit/aggregate-resources-test/aggregate-resources-test-plugin-config.xml
@@ -35,7 +35,7 @@ under the License.
<configuration>
<encoding>ISO-8859-1</encoding>
<project implementation="org.apache.maven.plugins.javadoc.stubs.AggregateResourcesTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/aggregate-resources-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/aggregate-resources-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/aggregate-resources-test/target/javadoc-bundle-options</javadocOptionsDir>
<windowtitle>Maven Javadoc Plugin aggregate resources 1.0-SNAPSHOT API</windowtitle>
<reactorProjects>
diff --git a/src/test/resources/unit/aggregate-test/aggregate-test-plugin-config.xml b/src/test/resources/unit/aggregate-test/aggregate-test-plugin-config.xml
index a0c318b6..ccb54906 100644
--- a/src/test/resources/unit/aggregate-test/aggregate-test-plugin-config.xml
+++ b/src/test/resources/unit/aggregate-test/aggregate-test-plugin-config.xml
@@ -35,7 +35,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.AggregateTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/aggregate-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/aggregate-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/aggregate-test/target/javadoc-bundle-options</javadocOptionsDir>
<breakiterator>false</breakiterator>
<old>false</old>
diff --git a/src/test/resources/unit/custom-configuration/custom-configuration-plugin-config.xml b/src/test/resources/unit/custom-configuration/custom-configuration-plugin-config.xml
index 6ed8ad0b..7bbe8fae 100644
--- a/src/test/resources/unit/custom-configuration/custom-configuration-plugin-config.xml
+++ b/src/test/resources/unit/custom-configuration/custom-configuration-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.CustomConfigurationMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/custom-configuration/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/custom-configuration/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/custom-configuration/target/javadoc-bundle-options</javadocOptionsDir>
<breakiterator>false</breakiterator>
<old>true</old>
diff --git a/src/test/resources/unit/default-configuration/default-configuration-plugin-config.xml b/src/test/resources/unit/default-configuration/default-configuration-plugin-config.xml
index ea9799f7..ff2e928d 100644
--- a/src/test/resources/unit/default-configuration/default-configuration-plugin-config.xml
+++ b/src/test/resources/unit/default-configuration/default-configuration-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.DefaultConfigurationMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/default-configuration/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/default-configuration/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/default-configuration/target/javadoc-bundle-options</javadocOptionsDir>
<breakiterator>false</breakiterator>
<old>false</old>
diff --git a/src/test/resources/unit/docfiles-test/docfiles-test-plugin-config.xml b/src/test/resources/unit/docfiles-test/docfiles-test-plugin-config.xml
index a77c595e..98d96038 100644
--- a/src/test/resources/unit/docfiles-test/docfiles-test-plugin-config.xml
+++ b/src/test/resources/unit/docfiles-test/docfiles-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.DocfilesTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/docfiles-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/docfiles-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/docfiles-test/target/javadoc-bundle-options</javadocOptionsDir>
<breakiterator>false</breakiterator>
<old>false</old>
diff --git a/src/test/resources/unit/docfiles-with-java-test/docfiles-with-java-test-plugin-config.xml b/src/test/resources/unit/docfiles-with-java-test/docfiles-with-java-test-plugin-config.xml
index cb7d6310..6938ceaa 100644
--- a/src/test/resources/unit/docfiles-with-java-test/docfiles-with-java-test-plugin-config.xml
+++ b/src/test/resources/unit/docfiles-with-java-test/docfiles-with-java-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.DocfilesWithJavaTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/docfiles-with-java-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/docfiles-with-java-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/docfiles-with-java-test/target/javadoc-bundle-options</javadocOptionsDir>
<javadocDirectory>${basedir}/src/test/resources/unit/docfiles-with-java-test/src/main</javadocDirectory>
<breakiterator>false</breakiterator>
diff --git a/src/test/resources/unit/doclet-path-test/doclet-path-test-plugin-config.xml b/src/test/resources/unit/doclet-path-test/doclet-path-test-plugin-config.xml
index e3ced151..44a1c9d9 100644
--- a/src/test/resources/unit/doclet-path-test/doclet-path-test-plugin-config.xml
+++ b/src/test/resources/unit/doclet-path-test/doclet-path-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.DocletPathTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/doclet-path-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/doclet-path-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/doclet-path-test/target/javadoc-bundle-options</javadocOptionsDir>
<doclet>UmlGraph</doclet>
<docletArtifacts>
diff --git a/src/test/resources/unit/doclet-test/doclet-test-plugin-config.xml b/src/test/resources/unit/doclet-test/doclet-test-plugin-config.xml
index bf3f197e..80b5dcaf 100644
--- a/src/test/resources/unit/doclet-test/doclet-test-plugin-config.xml
+++ b/src/test/resources/unit/doclet-test/doclet-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.DocletTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/doclet-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/doclet-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/doclet-test/target/javadoc-bundle-options</javadocOptionsDir>
<doclet>UmlGraph</doclet>
<docletArtifact>
diff --git a/src/test/resources/unit/file-include-exclude-test/file-include-exclude-plugin-config.xml b/src/test/resources/unit/file-include-exclude-test/file-include-exclude-plugin-config.xml
index 62899993..616a1225 100644
--- a/src/test/resources/unit/file-include-exclude-test/file-include-exclude-plugin-config.xml
+++ b/src/test/resources/unit/file-include-exclude-test/file-include-exclude-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.SubpackagesTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/file-include-exclude-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/file-include-exclude-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/file-include-exclude-test/target/javadoc-bundle-options</javadocOptionsDir>
<breakiterator>false</breakiterator>
<old>false</old>
diff --git a/src/test/resources/unit/header-footer-test/header-footer-test-plugin-config.xml b/src/test/resources/unit/header-footer-test/header-footer-test-plugin-config.xml
index 3793d127..98d4e51e 100644
--- a/src/test/resources/unit/header-footer-test/header-footer-test-plugin-config.xml
+++ b/src/test/resources/unit/header-footer-test/header-footer-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.HeaderFooterTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/header-footer-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/header-footer-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/header-footer-test/target/javadoc-bundle-options</javadocOptionsDir>
<show>protected</show>
<encoding>ISO-8859-1</encoding>
diff --git a/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/helpfile-test-1.0-SNAPSHOT.pom b/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/helpfile-test-1.0-SNAPSHOT.pom
index 0a0da4f0..6235931b 100644
--- a/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/helpfile-test-1.0-SNAPSHOT.pom
+++ b/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/helpfile-test-1.0-SNAPSHOT.pom
@@ -35,7 +35,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.HelpFileMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/helpfile-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/helpfile-test/target/site</outputDirectory>
<javadocDirectory>${basedir}/src/test/resources/unit/helpfile-test/src/main/javadoc</javadocDirectory>
<breakiterator>false</breakiterator>
<old>false</old>
diff --git a/src/test/resources/unit/helpfile-test/pom.xml b/src/test/resources/unit/helpfile-test/pom.xml
index 014927a9..097e36bf 100644
--- a/src/test/resources/unit/helpfile-test/pom.xml
+++ b/src/test/resources/unit/helpfile-test/pom.xml
@@ -35,7 +35,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.HelpFileMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/helpfile-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/helpfile-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/helpfile-test/target/javadoc-bundle-options</javadocOptionsDir>
<javadocDirectory>${basedir}/src/test/resources/unit/helpfile-test/src/main/javadoc</javadocDirectory>
<breakiterator>false</breakiterator>
diff --git a/src/test/resources/unit/javaHome-test/javaHome-test-plugin-config.xml b/src/test/resources/unit/javaHome-test/javaHome-test-plugin-config.xml
index 65ef5ee3..308c5ad7 100644
--- a/src/test/resources/unit/javaHome-test/javaHome-test-plugin-config.xml
+++ b/src/test/resources/unit/javaHome-test/javaHome-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.DefaultConfigurationMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/javaHome-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/javaHome-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/javaHome-test/target/javadoc-bundle-options</javadocOptionsDir>
<breakiterator>false</breakiterator>
<old>false</old>
diff --git a/src/test/resources/unit/javadocjar-archive-config/javadocjar-archive-config.xml b/src/test/resources/unit/javadocjar-archive-config/javadocjar-archive-config.xml
index f669fd3c..cbbcea6b 100644
--- a/src/test/resources/unit/javadocjar-archive-config/javadocjar-archive-config.xml
+++ b/src/test/resources/unit/javadocjar-archive-config/javadocjar-archive-config.xml
@@ -35,7 +35,7 @@ under the License.
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.JavadocJarArchiveConfigProjectStub"/>
<jarOutputDirectory>${basedir}/target/test/unit/javadocjar-archive-config/target</jarOutputDirectory>
- <outputDirectory>${basedir}/target/test/unit/javadocjar-archive-config/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/javadocjar-archive-config/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/javadocjar-archive-config/target/javadoc-bundle-options</javadocOptionsDir>
<finalName>javadocjar-archive-config</finalName>
<classifier>javadoc</classifier>
diff --git a/src/test/resources/unit/javadocjar-default/javadocjar-default-plugin-config.xml b/src/test/resources/unit/javadocjar-default/javadocjar-default-plugin-config.xml
index 28300521..de9d611f 100644
--- a/src/test/resources/unit/javadocjar-default/javadocjar-default-plugin-config.xml
+++ b/src/test/resources/unit/javadocjar-default/javadocjar-default-plugin-config.xml
@@ -35,7 +35,7 @@ under the License.
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.JavadocJarDefaultMavenProjectStub"/>
<jarOutputDirectory>${basedir}/target/test/unit/javadocjar-default/target</jarOutputDirectory>
- <outputDirectory>${basedir}/target/test/unit/javadocjar-default/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/javadocjar-default/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/javadocjar-default/target/javadoc-bundle-options</javadocOptionsDir>
<finalName>javadocjar-default</finalName>
<classifier>javadoc</classifier>
diff --git a/src/test/resources/unit/javadocjar-failonerror/javadocjar-failonerror-plugin-config.xml b/src/test/resources/unit/javadocjar-failonerror/javadocjar-failonerror-plugin-config.xml
index a91920fc..f0c160e9 100644
--- a/src/test/resources/unit/javadocjar-failonerror/javadocjar-failonerror-plugin-config.xml
+++ b/src/test/resources/unit/javadocjar-failonerror/javadocjar-failonerror-plugin-config.xml
@@ -35,7 +35,7 @@ under the License.
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.JavadocJarFailOnErrorMavenProjectStub"/>
<jarOutputDirectory>${basedir}/target/test/unit/javadocjar-failonerror/target</jarOutputDirectory>
- <outputDirectory>${basedir}/target/test/unit/javadocjar-failonerror/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/javadocjar-failonerror/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/javadocjar-failonerror/target/javadoc-bundle-options</javadocOptionsDir>
<finalName>javadocjar-failonerror</finalName>
<attach>true</attach>
diff --git a/src/test/resources/unit/javadocjar-invalid-destdir/javadocjar-invalid-destdir-plugin-config.xml b/src/test/resources/unit/javadocjar-invalid-destdir/javadocjar-invalid-destdir-plugin-config.xml
deleted file mode 100644
index 638c4d24..00000000
--- a/src/test/resources/unit/javadocjar-invalid-destdir/javadocjar-invalid-destdir-plugin-config.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId>
- <artifactId>javadocjar-invalid-destdir</artifactId>
- <packaging>jar</packaging>
- <version>1.0-SNAPSHOT</version>
- <inceptionYear>2006</inceptionYear>
- <name>Maven Javadoc Plugin Javadoc Jar Invalid Destdir Test</name>
- <url>http://maven.apache.org</url>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <project implementation="org.apache.maven.plugins.javadoc.stubs.JavadocJarInvalidDestdirMavenProjectStub"/>
- <destDir>${basedir}/target/test/unit/javadocjar-invalid-destdir/target/invalid</destDir>
- <jarOutputDirectory>${basedir}/target/test/unit/javadocjar-invalid-destdir/target</jarOutputDirectory>
- <outputDirectory>${basedir}/target/test/unit/javadocjar-invalid-destdir/target/site/apidocs</outputDirectory>
- <javadocOptionsDir>${basedir}/target/test/unit/javadocjar-invalid-destdir/target/javadoc-bundle-options</javadocOptionsDir>
- <finalName>javadocjar-invalid-destdir</finalName>
- <attach>true</attach>
- <breakiterator>false</breakiterator>
- <old>false</old>
- <show>protected</show>
- <quiet>true</quiet>
- <verbose>false</verbose>
- <author>true</author>
- <encoding>ISO-8859-1</encoding>
- <docfilessubdirs>false</docfilessubdirs>
- <linksource>false</linksource>
- <nocomment>false</nocomment>
- <nodeprecated>false</nodeprecated>
- <nodeprecatedlist>false</nodeprecatedlist>
- <nohelp>false</nohelp>
- <noindex>false</noindex>
- <nonavbar>false</nonavbar>
- <nosince>false</nosince>
- <notree>false</notree>
- <serialwarn>false</serialwarn>
- <splitindex>false</splitindex>
- <stylesheet>java</stylesheet>
- <groups/>
- <tags/>
- <use>true</use>
- <version>true</version>
- <windowtitle>Maven Javadoc Plugin Javadoc Jar Invalid Destdir Test 1.0-SNAPSHOT API</windowtitle>
- <debug>true</debug>
- <failOnError>true</failOnError>
- <reactorProjects>
- <project implementation="org.apache.maven.plugins.javadoc.stubs.JavadocJarInvalidDestdirMavenProjectStub"/>
- </reactorProjects>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/src/test/resources/unit/javadocjar-invalid-destdir/javadocjar/invalid/destdir/App.java b/src/test/resources/unit/javadocjar-invalid-destdir/javadocjar/invalid/destdir/App.java
deleted file mode 100644
index fbfd6ba1..00000000
--- a/src/test/resources/unit/javadocjar-invalid-destdir/javadocjar/invalid/destdir/App.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package javadocjar.invalid.destdir;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * This is a sample app class with javadoc
- *
- * @author Maria Odea Ching
- */
-public class App
-{
-
- /**
- * The main method
- *
- * @param args an array of strings that contains the arguments
- */
- public static void main( String[] args )
- {
- System.out.println( "Sample Application." );
- }
-
- /**
- * Sample method
- *
- * @param str the string to be displayed
- */
- protected void sampleMethod( String str )
- {
- System.out.println( str );
- }
-
-}
\ No newline at end of file
diff --git a/src/test/resources/unit/javadocjar-invalid-destdir/javadocjar/invalid/destdir/AppSample.java b/src/test/resources/unit/javadocjar-invalid-destdir/javadocjar/invalid/destdir/AppSample.java
deleted file mode 100644
index 2e512687..00000000
--- a/src/test/resources/unit/javadocjar-invalid-destdir/javadocjar/invalid/destdir/AppSample.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package javadocjar.invalid.destdir;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * This is a sample class with javadoc
- *
- * @author Maria Odea Ching
- */
-public class AppSample
-{
-
- /**
- * Variable that holds the test value
- */
- private String str = "TEST";
-
- /**
- * The main method
- *
- * @param args an array of strings that contains the arguments
- */
- public static void main( String[] args )
- {
- System.out.println( "Another Sample Application" );
- }
-
-}
\ No newline at end of file
diff --git a/src/test/resources/unit/jdk5-test/jdk5-test-plugin-config.xml b/src/test/resources/unit/jdk5-test/jdk5-test-plugin-config.xml
index ff0d75db..619e3524 100644
--- a/src/test/resources/unit/jdk5-test/jdk5-test-plugin-config.xml
+++ b/src/test/resources/unit/jdk5-test/jdk5-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.Jdk5TestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/jdk5-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/jdk5-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/jdk5-test/target/javadoc-bundle-options</javadocOptionsDir>
<show>protected</show>
<groups/>
diff --git a/src/test/resources/unit/jdk6-test/jdk6-test-plugin-config.xml b/src/test/resources/unit/jdk6-test/jdk6-test-plugin-config.xml
index 5221029c..d7293921 100644
--- a/src/test/resources/unit/jdk6-test/jdk6-test-plugin-config.xml
+++ b/src/test/resources/unit/jdk6-test/jdk6-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.Jdk6TestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/jdk6-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/jdk6-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/jdk6-test/target/javadoc-bundle-options</javadocOptionsDir>
<show>protected</show>
<encoding>ISO-8859-1</encoding>
diff --git a/src/test/resources/unit/newline-test/newline-test-plugin-config.xml b/src/test/resources/unit/newline-test/newline-test-plugin-config.xml
index 447134e2..3e89f1bf 100644
--- a/src/test/resources/unit/newline-test/newline-test-plugin-config.xml
+++ b/src/test/resources/unit/newline-test/newline-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.NewlineTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/newline-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/newline-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/newline-test/target/javadoc-bundle-options</javadocOptionsDir>
<show>protected</show>
<encoding>ISO-8859-1</encoding>
diff --git a/src/test/resources/unit/optionsumlautencoding-test/optionsumlautencoding-test-plugin-config.xml b/src/test/resources/unit/optionsumlautencoding-test/optionsumlautencoding-test-plugin-config.xml
index 88a45552..27687885 100644
--- a/src/test/resources/unit/optionsumlautencoding-test/optionsumlautencoding-test-plugin-config.xml
+++ b/src/test/resources/unit/optionsumlautencoding-test/optionsumlautencoding-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.OptionsUmlautEncodingMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/optionsumlautencoding-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/optionsumlautencoding-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/optionsumlautencoding-test/target/javadoc-bundle-options</javadocOptionsDir>
<breakiterator>false</breakiterator>
<old>false</old>
diff --git a/src/test/resources/unit/pom-test/pom-test-plugin-config.xml b/src/test/resources/unit/pom-test/pom-test-plugin-config.xml
index 59277066..6bf56394 100644
--- a/src/test/resources/unit/pom-test/pom-test-plugin-config.xml
+++ b/src/test/resources/unit/pom-test/pom-test-plugin-config.xml
@@ -40,7 +40,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.PomMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/pom-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/pom-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/pom-test/target/javadoc-bundle-options</javadocOptionsDir>
<show>protected</show>
<encoding>ISO-8859-1</encoding>
diff --git a/src/test/resources/unit/proxy-test/proxy-test-plugin-config.xml b/src/test/resources/unit/proxy-test/proxy-test-plugin-config.xml
index 48307907..d1a21ffd 100644
--- a/src/test/resources/unit/proxy-test/proxy-test-plugin-config.xml
+++ b/src/test/resources/unit/proxy-test/proxy-test-plugin-config.xml
@@ -35,7 +35,7 @@ under the License.
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.ProxyTestMavenProjectStub"/>
<settings implementation="org.apache.maven.plugins.javadoc.stubs.SettingsStub"/>
- <outputDirectory>${basedir}/target/test/unit/proxy-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/proxy-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/proxy-test/target/javadoc-bundle-options</javadocOptionsDir>
<show>protected</show>
<encoding>ISO-8859-1</encoding>
diff --git a/src/test/resources/unit/quotedpath'test/quotedpath-test-plugin-config.xml b/src/test/resources/unit/quotedpath'test/quotedpath-test-plugin-config.xml
index 7e38262c..9a77c5b9 100644
--- a/src/test/resources/unit/quotedpath'test/quotedpath-test-plugin-config.xml
+++ b/src/test/resources/unit/quotedpath'test/quotedpath-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.QuotedPathMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/quotedpath'test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/quotedpath'test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/quotedpath'test/target/javadoc-bundle-options</javadocOptionsDir>
<breakiterator>false</breakiterator>
<old>false</old>
diff --git a/src/test/resources/unit/resources-test/resources-test-plugin-config.xml b/src/test/resources/unit/resources-test/resources-test-plugin-config.xml
index f379b7e8..45a5bf83 100644
--- a/src/test/resources/unit/resources-test/resources-test-plugin-config.xml
+++ b/src/test/resources/unit/resources-test/resources-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.ResourcesTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/resources-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/resources-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/resources-test/target/javadoc-bundle-options</javadocOptionsDir>
<windowtitle>Maven Javadoc Plugin resources 1.0-SNAPSHOT API</windowtitle>
<javadocDirectory>${basedir}/src/test/resources/unit/resources-test/src/main/javadoc</javadocDirectory>
diff --git a/src/test/resources/unit/resources-with-excludes-test/resources-with-excludes-test-plugin-config.xml b/src/test/resources/unit/resources-with-excludes-test/resources-with-excludes-test-plugin-config.xml
index 4ebfbf1c..042e1ef2 100644
--- a/src/test/resources/unit/resources-with-excludes-test/resources-with-excludes-test-plugin-config.xml
+++ b/src/test/resources/unit/resources-with-excludes-test/resources-with-excludes-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.ResourcesWithExcludesTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/resources-with-excludes-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/resources-with-excludes-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/resources-with-excludes-test/target/javadoc-bundle-options</javadocOptionsDir>
<windowtitle>Maven Javadoc Plugin resources 1.0-SNAPSHOT API</windowtitle>
<javadocDirectory>${basedir}/src/test/resources/unit/resources-with-excludes-test/src/main/javadoc</javadocDirectory>
diff --git a/src/test/resources/unit/stale-test/stale-test-plugin-config.xml b/src/test/resources/unit/stale-test/stale-test-plugin-config.xml
index a463df98..4333ceda 100644
--- a/src/test/resources/unit/stale-test/stale-test-plugin-config.xml
+++ b/src/test/resources/unit/stale-test/stale-test-plugin-config.xml
@@ -43,7 +43,7 @@ under the License.
<jarOutputDirectory>${basedir}/target/test/unit/stale-test/target</jarOutputDirectory>
<finalName>pom-test</finalName>
<classifier>javadoc</classifier>
- <outputDirectory>${basedir}/target/test/unit/stale-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/stale-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/stale-test/target/javadoc-bundle-options</javadocOptionsDir>
<show>protected</show>
<encoding>ISO-8859-1</encoding>
diff --git a/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/stylesheetfile-test/1.0-SNAPSHOT/stylesheetfile-test-1.0-SNAPSHOT.pom b/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/stylesheetfile-test/1.0-SNAPSHOT/stylesheetfile-test-1.0-SNAPSHOT.pom
index 58c7b985..5a7fdf17 100644
--- a/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/stylesheetfile-test/1.0-SNAPSHOT/stylesheetfile-test-1.0-SNAPSHOT.pom
+++ b/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/stylesheetfile-test/1.0-SNAPSHOT/stylesheetfile-test-1.0-SNAPSHOT.pom
@@ -35,7 +35,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.StylesheetFileMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/stylesheetfile-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/stylesheetfile-test/target/site</outputDirectory>
<javadocDirectory>${basedir}/src/test/resources/unit/stylesheetfile-test/src/main/javadoc</javadocDirectory>
<breakiterator>false</breakiterator>
<old>false</old>
diff --git a/src/test/resources/unit/stylesheetfile-test/pom.xml b/src/test/resources/unit/stylesheetfile-test/pom.xml
index 978e62a2..51e6de9d 100644
--- a/src/test/resources/unit/stylesheetfile-test/pom.xml
+++ b/src/test/resources/unit/stylesheetfile-test/pom.xml
@@ -35,7 +35,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.StylesheetFileMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/stylesheetfile-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/stylesheetfile-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/stylesheetfile-test/target/javadoc-bundle-options</javadocOptionsDir>
<javadocDirectory>${basedir}/src/test/resources/unit/stylesheetfile-test/src/main/javadoc</javadocDirectory>
<breakiterator>false</breakiterator>
diff --git a/src/test/resources/unit/subpackages-test/subpackages-test-plugin-config.xml b/src/test/resources/unit/subpackages-test/subpackages-test-plugin-config.xml
index a6b04676..b8025d3a 100644
--- a/src/test/resources/unit/subpackages-test/subpackages-test-plugin-config.xml
+++ b/src/test/resources/unit/subpackages-test/subpackages-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.SubpackagesTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/subpackages-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/subpackages-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/subpackages-test/target/javadoc-bundle-options</javadocOptionsDir>
<breakiterator>false</breakiterator>
<old>false</old>
diff --git a/src/test/resources/unit/tag-test/tag-test-plugin-config.xml b/src/test/resources/unit/tag-test/tag-test-plugin-config.xml
index eb8b6e5e..6b8f2e8c 100644
--- a/src/test/resources/unit/tag-test/tag-test-plugin-config.xml
+++ b/src/test/resources/unit/tag-test/tag-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.TagTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/tag-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/tag-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/tag-test/target/javadoc-bundle-options</javadocOptionsDir>
<windowtitle>Maven Javadoc Plugin tag 1.0-SNAPSHOT API</windowtitle>
<show>protected</show>
diff --git a/src/test/resources/unit/taglet-test/taglet-test-plugin-config.xml b/src/test/resources/unit/taglet-test/taglet-test-plugin-config.xml
index ef6dbcac..019301b6 100644
--- a/src/test/resources/unit/taglet-test/taglet-test-plugin-config.xml
+++ b/src/test/resources/unit/taglet-test/taglet-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.TagletTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/taglet-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/taglet-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/taglet-test/target/javadoc-bundle-options</javadocOptionsDir>
<taglet>org.tullmann.taglets.ToDo</taglet>
<tagletArtifact>
diff --git a/src/test/resources/unit/tagletArtifacts-test/tagletArtifacts-test-plugin-config.xml b/src/test/resources/unit/tagletArtifacts-test/tagletArtifacts-test-plugin-config.xml
index 99845e3c..19a5a8ac 100644
--- a/src/test/resources/unit/tagletArtifacts-test/tagletArtifacts-test-plugin-config.xml
+++ b/src/test/resources/unit/tagletArtifacts-test/tagletArtifacts-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.TagletArtifactsMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/tagletArtifacts-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/tagletArtifacts-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/tagletArtifacts-test/target/javadoc-bundle-options</javadocOptionsDir>
<breakiterator>false</breakiterator>
<old>false</old>
diff --git a/src/test/resources/unit/test-javadoc-test/test-javadoc-test-plugin-config.xml b/src/test/resources/unit/test-javadoc-test/test-javadoc-test-plugin-config.xml
index 8c9d8439..cf4eff11 100644
--- a/src/test/resources/unit/test-javadoc-test/test-javadoc-test-plugin-config.xml
+++ b/src/test/resources/unit/test-javadoc-test/test-javadoc-test-plugin-config.xml
@@ -40,7 +40,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.TestJavadocMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/test-javadoc-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/test-javadoc-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/test-javadoc-test/target/javadoc-bundle-options</javadocOptionsDir>
<windowtitle>Maven Test Javadoc Plugin aggregate resources 1.0-SNAPSHOT API</windowtitle>
<show>protected</show>
diff --git a/src/test/resources/unit/validate-options-test/conflict-options-test-plugin-config.xml b/src/test/resources/unit/validate-options-test/conflict-options-test-plugin-config.xml
index 4999e7d7..e259d848 100644
--- a/src/test/resources/unit/validate-options-test/conflict-options-test-plugin-config.xml
+++ b/src/test/resources/unit/validate-options-test/conflict-options-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.StandardDocletConflictOptionsTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/validate-options-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/validate-options-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/validate-options-test/target/javadoc-bundle-options</javadocOptionsDir>
<show>protected</show>
<encoding>ISO-8859-1</encoding>
diff --git a/src/test/resources/unit/validate-options-test/wrong-charset-test-plugin-config.xml b/src/test/resources/unit/validate-options-test/wrong-charset-test-plugin-config.xml
index c65279d5..aa7294e3 100644
--- a/src/test/resources/unit/validate-options-test/wrong-charset-test-plugin-config.xml
+++ b/src/test/resources/unit/validate-options-test/wrong-charset-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.WrongEncodingOptionsTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/validate-options-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/validate-options-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/validate-options-test/target/javadoc-bundle-options</javadocOptionsDir>
<show>protected</show>
<groups/>
diff --git a/src/test/resources/unit/validate-options-test/wrong-docencoding-test-plugin-config.xml b/src/test/resources/unit/validate-options-test/wrong-docencoding-test-plugin-config.xml
index 35e1686c..79e47f17 100644
--- a/src/test/resources/unit/validate-options-test/wrong-docencoding-test-plugin-config.xml
+++ b/src/test/resources/unit/validate-options-test/wrong-docencoding-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.WrongEncodingOptionsTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/validate-options-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/validate-options-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/validate-options-test/target/javadoc-bundle-options</javadocOptionsDir>
<show>protected</show>
<groups/>
diff --git a/src/test/resources/unit/validate-options-test/wrong-encoding-test-plugin-config.xml b/src/test/resources/unit/validate-options-test/wrong-encoding-test-plugin-config.xml
index a484eb85..c06ec840 100644
--- a/src/test/resources/unit/validate-options-test/wrong-encoding-test-plugin-config.xml
+++ b/src/test/resources/unit/validate-options-test/wrong-encoding-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.WrongEncodingOptionsTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/validate-options-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/validate-options-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/validate-options-test/target/javadoc-bundle-options</javadocOptionsDir>
<show>protected</show>
<groups/>
diff --git a/src/test/resources/unit/validate-options-test/wrong-locale-with-variant-test-plugin-config.xml b/src/test/resources/unit/validate-options-test/wrong-locale-with-variant-test-plugin-config.xml
index 4ddf68ea..879b0e84 100644
--- a/src/test/resources/unit/validate-options-test/wrong-locale-with-variant-test-plugin-config.xml
+++ b/src/test/resources/unit/validate-options-test/wrong-locale-with-variant-test-plugin-config.xml
@@ -34,7 +34,7 @@ under the License.
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugins.javadoc.stubs.WrongEncodingOptionsTestMavenProjectStub"/>
- <outputDirectory>${basedir}/target/test/unit/validate-options-test/target/site/apidocs</outputDirectory>
+ <outputDirectory>${basedir}/target/test/unit/validate-options-test/target/site</outputDirectory>
<javadocOptionsDir>${basedir}/target/test/unit/validate-options-test/target/javadoc-bundle-options</javadocOptionsDir>
<show>protected</show>
<groups/>