diff --git a/src/it/different-doxia-versions/invoker.properties b/src/it/different-doxia-versions/invoker.properties
new file mode 100644
index 0000000..d179b3f
--- /dev/null
+++ b/src/it/different-doxia-versions/invoker.properties
@@ -0,0 +1,18 @@
+# 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.
+
+invoker.goals = site
diff --git a/src/it/different-doxia-versions/pom.xml b/src/it/different-doxia-versions/pom.xml
new file mode 100644
index 0000000..883ca4b
--- /dev/null
+++ b/src/it/different-doxia-versions/pom.xml
@@ -0,0 +1,86 @@
+
+
+
+
+
+ 4.0.0
+
+ org.apache.maven.shared.maven-reporting-exec.its
+ different-doxia-versions
+ 1.0-SNAPSHOT
+ jar
+
+ Different Doxia versions used from m-s-p and reporting-plugin
+
+
+ 2.1.0
+
+
+
+ jira
+ http://localhost/bla
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-site-plugin
+ @sitePluginVersion@
+
+
+ @project.groupId@
+ @project.artifactId@
+ @project.version@
+
+
+ org.apache.maven.doxia
+ doxia-core
+ ${doxia.version}
+
+
+ org.apache.maven.doxia
+ doxia-sink-api
+ ${doxia.version}
+
+
+
+
+
+
+
+ true
+
+
+ org.apache.maven.plugins
+ maven-changes-plugin
+ 3.0.0-M3
+
+
+
+ changes-report
+
+
+
+
+
+
+
diff --git a/src/it/different-doxia-versions/src/changes/changes.xml b/src/it/different-doxia-versions/src/changes/changes.xml
new file mode 100644
index 0000000..5a3f838
--- /dev/null
+++ b/src/it/different-doxia-versions/src/changes/changes.xml
@@ -0,0 +1,50 @@
+
+
+
+
+ Changes report Project
+ Mr Zloug
+
+
+
+
+ Added additional documentation on how to configure the plugin.
+
+
+ Enable retrieving component-specific issues.
+
+
+ Enable retrieving component-specific issues.
+
+
+ The element type " link " must be terminated by the matching end-tag.
+ Deleted the erroneous code.
+
+
+
+
+
+ Uploaded documentation on how to use the plugin.
+
+
+
+
\ No newline at end of file
diff --git a/src/it/different-doxia-versions/verify.bsh b/src/it/different-doxia-versions/verify.bsh
new file mode 100644
index 0000000..738a3b8
--- /dev/null
+++ b/src/it/different-doxia-versions/verify.bsh
@@ -0,0 +1,59 @@
+
+/*
+ * 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.*;
+import java.util.*;
+import java.util.jar.*;
+import org.codehaus.plexus.util.*;
+
+boolean result = true;
+
+try
+{
+ File report = new File( basedir, "target/site/changes.html" );
+ if ( !report.exists() || report.isDirectory() )
+ {
+ System.err.println( "report file is missing or a directory." );
+ return false;
+ }
+ String reportContent = FileUtils.fileRead( report );
+
+ int indexOf = reportContent.indexOf( "Changes" );
+ if ( indexOf < 0 )
+ {
+ System.err.println( "changes.html doesn't contains Changes Report title" );
+ return false;
+ }
+
+ indexOf = reportContent.indexOf( "href=\"http://localhost/MCHANGES-88\"" );
+ if ( indexOf < 0 )
+ {
+ System.err.println( "changes.html doesn't contains jira issue link" );
+ return false;
+ }
+
+}
+catch ( Throwable e )
+{
+ e.printStackTrace();
+ result = false;
+}
+
+return result;
diff --git a/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java b/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
index c901dba..3564db4 100644
--- a/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
+++ b/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
@@ -111,24 +111,25 @@ public class DefaultMavenReportExecutor implements MavenReportExecutor {
private final PluginVersionResolver pluginVersionResolver;
+ /**
+ * All packages which are imported from the Site plugin ClassRealm to the report plugin ClassRealm.
+ * This should correlate to the list of artifacts excluded via {@link #EXCLUDES} (although imports are always considered first).
+ * The given package names are used as prefix, so all classes/resources from the given packages and their sub-packages are imported.
+ */
private static final List IMPORTS = Arrays.asList(
- "org.apache.maven.reporting.MavenReport",
- "org.apache.maven.reporting.MavenMultiPageReport",
- // TODO Will be removed after Doxia 2.0.0
- "org.apache.maven.doxia.siterenderer.Renderer",
- "org.apache.maven.doxia.siterenderer.SiteRenderer",
- "org.apache.maven.doxia.sink.SinkFactory",
- // TODO Will be removed after Doxia 2.0.0
- "org.codehaus.doxia.sink.Sink",
- "org.apache.maven.doxia.sink.Sink",
- "org.apache.maven.doxia.sink.SinkEventAttributes",
- // TODO Will be removed with Doxia 2.0.0
- "org.apache.maven.doxia.logging.LogEnabled",
- // TODO Will be removed with Doxia 2.0.0
- "org.apache.maven.doxia.logging.Log");
+ "org.apache.maven.reporting",
+ "org.apache.maven.doxia.siterenderer",
+ "org.apache.maven.doxia.macro",
+ "org.apache.maven.doxia.parser",
+ "org.apache.maven.doxia.sink",
+ "org.apache.maven.doxia.util");
+ /**
+ * The following artifacts are provided in the version as referenced in the site plugin (to prevent versions conflicts with the one used by the report plugin).
+ * This must correlate to the list of packages imported in {@link #IMPORTS}.
+ */
private static final List EXCLUDES =
- Arrays.asList("doxia-site-renderer", "doxia-sink-api", "maven-reporting-api");
+ Arrays.asList("doxia-sink-api", "doxia-core", "doxia-site-renderer", "maven-reporting-api");
@Inject
public DefaultMavenReportExecutor(