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 Oct 14, 2023
1 parent c16ec94 commit c61e13c
Show file tree
Hide file tree
Showing 41 changed files with 407 additions and 381 deletions.
90 changes: 44 additions & 46 deletions pom.xml
Expand Up @@ -28,7 +28,7 @@ under the License.
</parent>

<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.4.6-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,14 @@ 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-M13</doxiaSitetoolsVersion>
<mavenVersion>3.2.5</mavenVersion>
<scmVersion>1.13.0</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-M11</sitePluginVersion>
<fluidoSkinVersion>2.0.0-M8</fluidoSkinVersion>
<surefire.version>3.1.2</surefire.version>
<checkstyle.violation.ignore>ParameterNumber,MethodLength</checkstyle.violation.ignore>
<project.build.outputTimestamp>2023-06-03T12:55:40Z</project.build.outputTimestamp>
</properties>
Expand All @@ -130,12 +130,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-M8</version>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>3.2.0</version>
<version>4.0.0-M11</version>
<exclusions>
<exclusion>
<groupId>org.apache.maven</groupId>
Expand Down Expand Up @@ -303,56 +303,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 @@ -495,6 +457,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 @@ -559,6 +528,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
53 changes: 27 additions & 26 deletions src/it/MPIR-431/verify.groovy
Expand Up @@ -18,36 +18,37 @@
*/
String html = new File( basedir, 'target/site/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() ) )
14 changes: 7 additions & 7 deletions src/it/MPIR-437/verify.groovy
Expand Up @@ -19,13 +19,13 @@
File dependencies = new File( basedir, 'target/site/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
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
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
2 changes: 1 addition & 1 deletion src/it/minimal-pom/pom.xml
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
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
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
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>' )
Expand Up @@ -91,36 +91,5 @@ protected void text(String text) {
}
}

/* FIXME The next two methods need to be retained until Doxia and Maven Reporting Impl properly implement
* the difference of a (boxed) real verbatim text and (boxed) source code.
*/
/**
* {@inheritDoc}
*/
@Override
protected void verbatimText(String text) {
sink.verbatim(null);

text(text);

sink.verbatim_();
}

/**
* {@inheritDoc}
*/
@Override
protected void verbatimLink(String text, String href) {
if (href == null || href.isEmpty()) {
verbatimText(text);
} else {
sink.verbatim(null);

link(href, text);

sink.verbatim_();
}
}

protected abstract String getI18Nsection();
}

0 comments on commit c61e13c

Please sign in to comment.