Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/it/different-doxia-versions/invoker.properties
Original file line number Diff line number Diff line change
@@ -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
86 changes: 86 additions & 0 deletions src/it/different-doxia-versions/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
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.shared.maven-reporting-exec.its</groupId>
<artifactId>different-doxia-versions</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Different Doxia versions used from m-s-p and reporting-plugin</name>

<properties>
<doxia.version>2.1.0</doxia.version>
</properties>

<issueManagement>
<system>jira</system>
<url>http://localhost/bla</url>
</issueManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
<dependencies>
<dependency>
<groupId>@project.groupId@</groupId>
<artifactId>@project.artifactId@</artifactId>
<version>@project.version@</version>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-core</artifactId>
<version>${doxia.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-sink-api</artifactId>
<version>${doxia.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
<version>3.0.0-M3</version><!-- 2.12.1 is no longer compatible due to https://github.com/apache/maven-doxia/issues/1054-->
<reportSets>
<reportSet>
<reports>
<report>changes-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
</project>
50 changes: 50 additions & 0 deletions src/it/different-doxia-versions/src/changes/changes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!--
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.
-->

<document xmlns="http://maven.apache.org/changes/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/changes/2.0.0 http://maven.apache.org/xsd/changes-2.0.0.xsd">
<properties>
<title>Changes report Project</title>
<author email="zloug@toto.com">Mr Zloug</author>
</properties>
<body>
<release version="1.1" date="2005-03-01" description="Subsequent release">
<action dev="me" type="add">
Added additional documentation on how to configure the plugin.
</action>
<action dev="me" type="fix" issue="MCHANGES-88">
Enable retrieving component-specific issues.
</action>
<action dev="me" type="fix" issue="1212" system="qc">
Enable retrieving component-specific issues.
</action>
<action dev="jruiz" type="remove" due-to="others" due-to-email="users@users.com">
The element type " link " must be terminated by the matching end-tag.
Deleted the erroneous code.
</action>
</release>

<release version="1.0" date="2005-01-01" description="First release">
<action dev="me" type="update" date="2008-01-01">
Uploaded documentation on how to use the plugin.
</action>
</release>
</body>
</document>
59 changes: 59 additions & 0 deletions src/it/different-doxia-versions/verify.bsh
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> 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<String> 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");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as maven-reporting-impl can depends on api ... maybe should also be provided?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a concrete example which lead to issues that can be used as IT?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not now

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about the impact of EXCLUDES at all since imports are always considered first IIRC or am I wrong here?

Copy link
Copy Markdown
Member Author

@kwin kwin Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"reporting-impl" is not provided by the parent classloader (i.e. the one from m-s-p) therefore cannot be excluded.


@Inject
public DefaultMavenReportExecutor(
Expand Down
Loading