Skip to content

Commit

Permalink
[MCHECKSTYLE-417] Upgrade Maven Reporting API to 3.1.1/Maven Reportin…
Browse files Browse the repository at this point in the history
…g Impl to 3.2.0

This plugin hasn't been touched testwise for a very long time. The testing
approach from MPIR has been applied to accommodate M-R-Impl 3.2.0 and future
versions of it. The negative effect is that the parameter 'encoding'
has duplicated 'inputEncoding' from AbstractMavenReport for a long time.
For the sake of consistency it has been replaced with 'inputEncoding' which
breaks backward compatibility. Users are advised to use
${project.build.sourceEncoding} anyway.

This also upgrades for ITs:
* Maven Site Plugin to 3.12.1
* Maven JXR Plugin to 3.3.0

This closes #87
  • Loading branch information
michael-o committed Aug 19, 2022
1 parent cbf3751 commit 627fa4f
Show file tree
Hide file tree
Showing 65 changed files with 702 additions and 437 deletions.
92 changes: 68 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version='1.0' encoding='UTF-8'?>
<?xml version="1.0" encoding="UTF-8"?>

<!--
Licensed to the Apache Software Foundation (ASF) under one
Expand Down Expand Up @@ -64,11 +64,13 @@ under the License.

<properties>
<javaVersion>8</javaVersion>
<aetherVersion>1.0.0.v20140518</aetherVersion>
<mavenVersion>3.2.5</mavenVersion>
<checkstyleVersion>9.3</checkstyleVersion>
<doxiaVersion>1.11.1</doxiaVersion>
<sitePluginVersion>3.9.1</sitePluginVersion>
<surefire.version>2.22.2</surefire.version>
<doxiaSitetoolsVersion>1.11.1</doxiaSitetoolsVersion>
<sitePluginVersion>3.12.1</sitePluginVersion>
<jxrPluginVersion>3.3.0</jxrPluginVersion>
<project.build.outputTimestamp>2021-01-23T22:30:12Z</project.build.outputTimestamp>
</properties>

Expand Down Expand Up @@ -117,35 +119,33 @@ under the License.
</dependency>

<!-- shared -->
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-api</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>3.1.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
<version>3.2.0</version>
</dependency>

<!-- doxia -->
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-site-renderer</artifactId>
<artifactId>doxia-sink-api</artifactId>
<version>${doxiaVersion}</version>
<exclusions>
<exclusion>
<artifactId>plexus-container-default</artifactId>
<groupId>org.codehaus.plexus</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-integration-tools</artifactId>
<artifactId>doxia-core</artifactId>
<version>${doxiaVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-integration-tools</artifactId>
<version>${doxiaSitetoolsVersion}</version>
</dependency>

<!-- plexus -->
<dependency>
Expand All @@ -168,11 +168,6 @@ under the License.
<artifactId>plexus-utils</artifactId>
<version>3.4.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-interpolation</artifactId>
<version>1.26</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-velocity</artifactId>
Expand Down Expand Up @@ -208,17 +203,65 @@ under the License.
</dependency>

<!-- test -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>2.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>3.3.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-api</artifactId>
<version>${aetherVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-impl</artifactId>
<version>${aetherVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-connector-basic</artifactId>
<version>${aetherVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-transport-wagon</artifactId>
<version>${aetherVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http-lightweight</artifactId>
<version>3.5.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
Expand Down Expand Up @@ -335,6 +378,7 @@ under the License.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<goals>
Expand Down Expand Up @@ -376,7 +420,7 @@ under the License.
</plugins>
</reporting>
</profile>

<profile>
<id>jdk9</id>
<activation>
Expand Down
11 changes: 4 additions & 7 deletions src/it/MCHECKSTYLE-129/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ under the License.
<version>1.0-SNAPSHOT</version>
<name>checkstyle-new</name>
<url>http://maven.apache.org</url>
<properties>
<checkstyleVersion>@pom.version@</checkstyleVersion>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
Expand All @@ -46,16 +43,16 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyleVersion}</version>
</plugin>
<version>@project.version@</version>
</plugin>
</plugins>
</build>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyleVersion}</version>
<version>@project.version@</version>
<configuration>
<configLocation>https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-8.28/src/main/resources/sun_checks.xml</configLocation>
</configuration>
Expand Down
4 changes: 2 additions & 2 deletions src/it/MCHECKSTYLE-131/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>@pom.version@</version>
<version>@project.version@</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
</configuration>
</plugin>
</plugins>
</build>
</project>
</project>
6 changes: 1 addition & 5 deletions src/it/MCHECKSTYLE-137/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
<version>@project.version@</version>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<linkXRef>false</linkXRef>
Expand Down
3 changes: 1 addition & 2 deletions src/it/MCHECKSTYLE-169/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ under the License.

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<checkstyleVersion>@project.version@</checkstyleVersion>
</properties>

<build>
Expand All @@ -41,7 +40,7 @@ under the License.
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyleVersion}</version>
<version>@project.version@</version>
</plugin>
<plugin>
<inherited>true</inherited>
Expand Down
6 changes: 3 additions & 3 deletions src/it/MCHECKSTYLE-172/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>@pom.version@</version>
<version>@project.version@</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
</plugin>
</plugin>
</plugins>
</build>
<reporting>
Expand All @@ -55,7 +55,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>@pom.version@</version>
<version>@project.version@</version>
</plugin>
</plugins>
</reporting>
Expand Down
2 changes: 1 addition & 1 deletion src/it/MCHECKSTYLE-173-with-charset/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>@pom.version@</version>
<version>@project.version@</version>
<configuration>
<configLocation>checkstyle-with-charset.xml</configLocation>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion src/it/MCHECKSTYLE-173-without-charset/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>@pom.version@</version>
<version>@project.version@</version>
<configuration>
<configLocation>checkstyle-without-charset.xml</configLocation>
</configuration>
Expand Down
10 changes: 4 additions & 6 deletions src/it/MCHECKSTYLE-193/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>@pom.version@</version>
<version>@project.version@</version>
<configuration>
<encoding>UTF-8</encoding>
<configLocation>checkstyle.xml</configLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<configLocation>checkstyle.xml</configLocation>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
</configuration>
<executions>
<execution>
Expand Down
2 changes: 1 addition & 1 deletion src/it/MCHECKSTYLE-219-no-license_failure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>@pom.version@</version>
<version>@project.version@</version>
<executions>
<execution>
<id>check</id>
Expand Down
2 changes: 1 addition & 1 deletion src/it/MCHECKSTYLE-219-no-license_success/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>@pom.version@</version>
<version>@project.version@</version>
<executions>
<execution>
<id>check</id>
Expand Down
4 changes: 2 additions & 2 deletions src/it/MCHECKSTYLE-222-no-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>@pom.version@</version>
<version>@project.version@</version>
</plugin>
</plugins>
</build>
Expand All @@ -42,7 +42,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>@pom.version@</version>
<version>@project.version@</version>
<reportSets>
<reportSet>
<reports>
Expand Down
4 changes: 2 additions & 2 deletions src/it/MCHECKSTYLE-222-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>@pom.version@</version>
<version>@project.version@</version>
</plugin>
</plugins>
</build>
Expand All @@ -42,7 +42,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>@pom.version@</version>
<version>@project.version@</version>
<reportSets>
<reportSet>
<reports>
Expand Down
4 changes: 2 additions & 2 deletions src/it/MCHECKSTYLE-222-testResources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>@pom.version@</version>
<version>@project.version@</version>
</plugin>
</plugins>
</build>
Expand All @@ -42,7 +42,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>@pom.version@</version>
<version>@project.version@</version>
<reportSets>
<reportSet>
<reports>
Expand Down
2 changes: 1 addition & 1 deletion src/it/MCHECKSTYLE-224/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.4</version>
<version>@jxrPluginVersion@</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Loading

0 comments on commit 627fa4f

Please sign in to comment.