Skip to content

Commit

Permalink
Prepare for Doxia 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-o committed Dec 13, 2023
1 parent 70e4136 commit 817650a
Show file tree
Hide file tree
Showing 47 changed files with 420 additions and 395 deletions.
89 changes: 43 additions & 46 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ under the License.
</parent>

<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.5.1-SNAPSHOT</version>
<version>4.0.0-M1-SNAPSHOT</version>
<packaging>maven-plugin</packaging>

<name>Apache Maven Project Info Reports Plugin</name>
Expand Down Expand Up @@ -114,14 +114,13 @@ under the License.
</distributionManagement>

<properties>
<doxiaVersion>1.11.1</doxiaVersion>
<doxiaSitetoolsVersion>1.11.1</doxiaSitetoolsVersion>
<doxiaVersion>2.0.0-M8</doxiaVersion>
<doxiaSitetoolsVersion>2.0.0-M16</doxiaSitetoolsVersion>
<mavenVersion>3.2.5</mavenVersion>
<scmVersion>2.0.1</scmVersion>
<aetherVersion>1.0.0.v20140518</aetherVersion>
<sitePluginVersion>3.12.1</sitePluginVersion>
<fluidoSkinVersion>1.11.1</fluidoSkinVersion>
<surefire.version>3.1.0</surefire.version>
<sitePluginVersion>4.0.0-M12</sitePluginVersion>
<fluidoSkinVersion>2.0.0-M8</fluidoSkinVersion>
<checkstyle.violation.ignore>ParameterNumber,MethodLength</checkstyle.violation.ignore>
<project.build.outputTimestamp>2023-11-17T21:50:41Z</project.build.outputTimestamp>
</properties>
Expand All @@ -130,12 +129,12 @@ under the License.
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-api</artifactId>
<version>3.1.1</version>
<version>4.0.0-M9</version>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>3.2.0</version>
<version>4.0.0-M13</version>
<exclusions>
<exclusion>
<groupId>org.apache.maven</groupId>
Expand Down Expand Up @@ -270,56 +269,18 @@ under the License.
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-sink-api</artifactId>
<version>${doxiaVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-core</artifactId>
<version>${doxiaVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Doxia Sitetools -->
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-decoration-model</artifactId>
<version>${doxiaSitetoolsVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-site-renderer</artifactId>
<version>${doxiaSitetoolsVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-integration-tools</artifactId>
<version>${doxiaSitetoolsVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Plexus -->
Expand Down Expand Up @@ -459,6 +420,13 @@ under the License.
<keyalg>RSA</keyalg>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand Down Expand Up @@ -523,6 +491,35 @@ under the License.
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<!--
This is necessary if "mvn site" has been invoked previously with 3.x
and leaves 0-byte files in the local repository for MRM Maven Plugin
to serve which are broken from a consumer's PoV.
-->
<executions>
<execution>
<id>delete-0-byte-site-descriptors</id>
<goals>
<goal>clean</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<excludeDefaultDirectories>true</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>${settings.localRepository}/org/apache/apache</directory>
<includes>
<include>**/*-site*.xml</include>
</includes>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions src/it/MPIR-300/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

plugins = new File( basedir, 'target/site/plugins.html' ).text;
plugins = new File( basedir, 'target/reports/plugins.html' ).text;

// version of maven-invoker-plugin is defined in pluginManagement
assert plugins.contains( '<td>1.invoker-pluginManagement</td>' );
Expand All @@ -31,4 +31,4 @@ assert plugins.contains( '<td>2.checkstyle-plugin</td>' );
// version of maven-changes-plugin is defined in reporting (overriding pluginManagement and plugins)
assert plugins.contains( '<td>3.changes-reporting</td>' );

return true;
return true;
4 changes: 2 additions & 2 deletions src/it/MPIR-349/parent/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* under the License.
*/

File indexPage = new File( basedir, 'target/site/index.html' )
File indexPage = new File( basedir, 'target/reports/index.html' )
assert !indexPage.text.contains( 'sitePublishLocation' )

File modulesPage = new File( basedir, 'target/site/modules.html' )
File modulesPage = new File( basedir, 'target/reports/modules.html' )
assert !modulesPage.text.contains( 'sitePublishLocation' )
4 changes: 2 additions & 2 deletions src/it/MPIR-375/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
File log = new File( basedir, 'build.log' );
assert !( log.text.contains("org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find org.eclipse.m2e:lifecycle-mapping:pom") );

plugins = new File( basedir, 'target/site/plugin-management.html' ).text;
plugins = new File( basedir, 'target/reports/plugin-management.html' ).text;

// maven-javadoc-plugin is defined in pluginManagement and not excluded
assert plugins.contains( 'maven-javadoc-plugin' );

// org.eclipse.m2e:lifecycle-mapping plugin is excluded
assert !( plugins.contains( 'org.eclipse.m2e' ) );
assert !( plugins.contains( 'lifecycle-mapping' ) );
assert !( plugins.contains( 'lifecycle-mapping' ) );
2 changes: 1 addition & 1 deletion src/it/MPIR-407/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

dependencies = new File( basedir, 'target/site/dependencies.html' ).text;
dependencies = new File( basedir, 'target/reports/dependencies.html' ).text;

assert !( dependencies.contains( 'The Apache Software License, Version 2.0' ) );
assert !( dependencies.contains( 'Apache Public License 2.0' ) );
2 changes: 1 addition & 1 deletion src/it/MPIR-412/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ import groovy.xml.XmlParser
// should be able to parse the output as XML
parser = new XmlParser();
parser.setFeature( 'http://apache.org/xml/features/disallow-doctype-decl', false );
result = parser.parse( new File( basedir, 'target/site/dependencies.html' ) );
result = parser.parse( new File( basedir, 'target/reports/dependencies.html' ) );
assert result instanceof Node;
55 changes: 28 additions & 27 deletions src/it/MPIR-431/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,39 @@
* specific language governing permissions and limitations
* under the License.
*/
String html = new File( basedir, 'target/site/dependencies.html' ).text
String html = new File( basedir, 'target/reports/dependencies.html' ).text

// Revise after DOXIA-704
def summaryLine = '''\
<tr class="b">
<td align="right">compile: 1</td>
<td align="right">compile: 45.5 kB</td>
<td align="right">compile: 47</td>
<td align="right">compile: 36</td>
<td align="right">compile: 4</td>
<td rowspan="3" style="vertical-align: middle;" align="center">1.3</td>
<td align="right">compile: 1</td></tr>
<td style="text-align: right;">compile: 1</td>
<td style="text-align: right;">compile: 45.5 kB</td>
<td style="text-align: right;">compile: 47</td>
<td style="text-align: right;">compile: 36</td>
<td style="text-align: right;">compile: 4</td>
<td rowspan="3" style="text-align: center; vertical-align: middle;">1.3</td>
<td style="text-align: right;">compile: 1</td></tr>
<tr class="a">
<td align="right">runtime: 1</td>
<td align="right">runtime: 284.2 kB</td>
<td align="right">runtime: 155</td>
<td align="right">runtime: 133</td>
<td align="right">runtime: 10</td>
<td align="right">runtime: 1</td></tr>
<td style="text-align: right;">runtime: 1</td>
<td style="text-align: right;">runtime: 284.2 kB</td>
<td style="text-align: right;">runtime: 155</td>
<td style="text-align: right;">runtime: 133</td>
<td style="text-align: right;">runtime: 10</td>
<td style="text-align: right;">runtime: 1</td></tr>
<tr class="b">
<td align="right">provided: 1</td>
<td align="right">provided: 85.7 kB</td>
<td align="right">provided: 209</td>
<td align="right">provided: 192</td>
<td align="right">provided: 4</td>
<td align="right">-</td></tr>
<td style="text-align: right;">provided: 1</td>
<td style="text-align: right;">provided: 85.7 kB</td>
<td style="text-align: right;">provided: 209</td>
<td style="text-align: right;">provided: 192</td>
<td style="text-align: right;">provided: 4</td>
<td style="text-align: right;">-</td></tr>
<tr class="a">
<td align="right">test: 3</td>
<td align="right">test: 2.2 MB</td>
<td align="right">test: 1619</td>
<td align="right">test: 1493</td>
<td align="right">test: 91</td>
<td align="center">1.8</td>
<td align="right">test: 3</td></tr>'''
<td style="text-align: right;">test: 3</td>
<td style="text-align: right;">test: 2.2 MB</td>
<td style="text-align: right;">test: 1619</td>
<td style="text-align: right;">test: 1493</td>
<td style="text-align: right;">test: 91</td>
<td style="text-align: center;">1.8</td>
<td style="text-align: right;">test: 3</td></tr>'''

assert html.contains( summaryLine.replaceAll( "\n", System.lineSeparator() ) )
16 changes: 8 additions & 8 deletions src/it/MPIR-437/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
File dependencies = new File( basedir, 'target/site/dependencies.html' )
File dependencies = new File( basedir, 'target/reports/dependencies.html' )
def summaryRow = '''\
<tr class="b">
<td align="right">1</td>
<td align="right">78.8 kB</td>
<td align="right">141</td>
<td align="right">-</td>
<td align="right">-</td>
<td align="center">-</td>
<td align="right">-</td></tr>
<td style="text-align: right;">1</td>
<td style="text-align: right;">78.8 kB</td>
<td style="text-align: right;">141</td>
<td style="text-align: right;">-</td>
<td style="text-align: right;">-</td>
<td style="text-align: center;">-</td>
<td style="text-align: right;">-</td></tr>
'''

assert dependencies.text.contains( summaryRow.replaceAll( "\n", System.lineSeparator() ) )
28 changes: 14 additions & 14 deletions src/it/dependencies-java-1.7-and-1.8/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@
File dependencies = new File( basedir, 'target/site/dependencies.html' )
def mavenModel = '''\
<tr class="a">
<td align="left">maven-model-3.3.9.jar</td>
<td align="right">164 kB</td>
<td align="right">71</td>
<td align="right">54</td>
<td align="right">3</td>
<td align="center">1.7</td>
<td align="center">Yes</td></tr>
<td style="text-align: left;">maven-model-3.3.9.jar</td>
<td style="text-align: right;">164 kB</td>
<td style="text-align: right;">71</td>
<td style="text-align: right;">54</td>
<td style="text-align: right;">3</td>
<td style="text-align: center;">1.7</td>
<td style="text-align: center;">Yes</td></tr>
'''

def jacksonDataTypeJsr310 = '''\
<tr class="a">
<td align="left">jackson-datatype-jsr310-2.6.4.jar</td>
<td align="right">78.1 kB</td>
<td align="right">69</td>
<td align="right">51</td>
<td align="right">5</td>
<td align="center">1.8</td>
<td align="center">Yes</td></tr>
<td style="text-align: left;">jackson-datatype-jsr310-2.6.4.jar</td>
<td style="text-align: right;">78.1 kB</td>
<td style="text-align: right;">69</td>
<td style="text-align: right;">51</td>
<td style="text-align: right;">5</td>
<td style="text-align: center;">1.8</td>
<td style="text-align: center;">Yes</td></tr>
'''

assert dependencies.text.contains( mavenModel.replaceAll( "\n", System.getProperty( "line.separator" ) ) )
Expand Down
2 changes: 1 addition & 1 deletion src/it/full-pom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
<configuration>
<locales>en,cs,de,en,es,fr,gl,hu,it,ja,ko,lt,nl,no,pl,pt,pt_BR,ru,sk,sv,tr,zh_CN,zh_TW</locales>
<locales>default,en,cs,de,en,es,fr,gl,hu,it,ja,ko,lt,nl,no,pl,pt,pt_BR,ru,sk,sv,tr,zh_CN,zh_TW</locales>
</configuration>
</plugin>
</plugins>
Expand Down
8 changes: 4 additions & 4 deletions src/it/java-version/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* under the License.
*/

assert new File( basedir, 'plugin/target/site/summary.html' ).text.contains( '<td>1.5</td>' )
assert new File( basedir, 'pluginManagement/target/site/summary.html' ).text.contains( '<td>1.4</td>' )
assert new File( basedir, 'property/target/site/summary.html' ).text.contains( '<td>1.3</td>' )
assert new File( basedir, 'plugin/target/reports/summary.html' ).text.contains( '<td>1.5</td>' )
assert new File( basedir, 'pluginManagement/target/reports/summary.html' ).text.contains( '<td>1.4</td>' )
assert new File( basedir, 'property/target/reports/summary.html' ).text.contains( '<td>1.3</td>' )

return true;
return true;
2 changes: 1 addition & 1 deletion src/it/minimal-pom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
<configuration>
<locales>en,cs,de,es,fr,hu,it,ja,ko,nl,no,pl,pt,pt_BR,sk,sv,tr,zh_CN,zh_TW</locales>
<locales>default,en,cs,de,es,fr,hu,it,ja,ko,nl,no,pl,pt,pt_BR,sk,sv,tr,zh_CN,zh_TW</locales>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion src/it/mpir-229/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
* under the License.
*/
File modulesPage = new File( basedir, 'target/site/modules.html' )
assert modulesPage.text.contains( '<a href="mpir-229-module1-1.0-SNAPSHOT/index.html" title="mpir-229-module1"><span class="none"></span>mpir-229-module1</a>' )
assert modulesPage.text.contains( '<a href="mpir-229-module1-1.0-SNAPSHOT/index.html">mpir-229-module1</a>' )
3 changes: 0 additions & 3 deletions src/it/multi-module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
<configuration>
<locales>en</locales>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
4 changes: 2 additions & 2 deletions src/it/multi-module/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ File mainDependencies = new File( basedir, 'main/target/site/dependencies.html'

// Dependency File Details section should display dep-1.0-SNAPSHOT.jar packaged from previous build (package phase),
// not dep/target/classes from current build (site phase)
assert !mainDependencies.text.contains( '<td align="left">dep/target/classes</td>' )
assert mainDependencies.text.contains( '<td align="left">dep-1.0-SNAPSHOT.jar</td>' )
assert !mainDependencies.text.contains( '<td style="text-align: left;">dep/target/classes</td>' )
assert mainDependencies.text.contains( '<td style="text-align: left;">dep-1.0-SNAPSHOT.jar</td>' )
Loading

0 comments on commit 817650a

Please sign in to comment.