Skip to content

Commit

Permalink
[MPIR-454] Upgrade to Doxia 2.0.0 Milestone Stack
Browse files Browse the repository at this point in the history
This closes #43
  • Loading branch information
michael-o committed Jul 20, 2024
1 parent 8813fea commit 7de65bf
Show file tree
Hide file tree
Showing 51 changed files with 516 additions and 477 deletions.
75 changes: 44 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,14 @@ under the License.
</distributionManagement>

<properties>
<javaVersion>8</javaVersion>
<mavenVersion>3.6.3</mavenVersion>
<doxiaVersion>1.11.1</doxiaVersion>
<doxiaSitetoolsVersion>1.11.1</doxiaSitetoolsVersion>
<scmVersion>2.1.0</scmVersion>
<resolverVersion>1.4.1</resolverVersion>
<sitePluginVersion>3.12.1</sitePluginVersion>
<fluidoSkinVersion>1.11.1</fluidoSkinVersion>
<doxiaVersion>2.0.0-M12</doxiaVersion>
<doxiaSitetoolsVersion>2.0.0-M19</doxiaSitetoolsVersion>
<scmVersion>2.1.0</scmVersion>
<sitePluginVersion>4.0.0-M16</sitePluginVersion>
<fluidoSkinVersion>2.0.0-M9</fluidoSkinVersion>
<checkstyle.violation.ignore>ParameterNumber,MethodLength</checkstyle.violation.ignore>
<project.build.outputTimestamp>2024-07-11T18:06:39Z</project.build.outputTimestamp>
</properties>
Expand All @@ -129,18 +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-M12</version>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>3.2.0</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
<version>4.0.0-M15</version>
</dependency>

<!-- Maven -->
Expand Down Expand Up @@ -258,36 +253,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-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 @@ -427,6 +404,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 @@ -491,6 +475,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() ) )
2 changes: 0 additions & 2 deletions src/it/MPIR-455/invoker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,4 @@
# specific language governing permissions and limitations
# under the License.

# Remove with next major version
invoker.mavenOpts = -Duser.language=en
invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:dependencies
Loading

0 comments on commit 7de65bf

Please sign in to comment.