Skip to content

Commit 627fa4f

Browse files
committed
[MCHECKSTYLE-417] Upgrade Maven Reporting API to 3.1.1/Maven Reporting 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
1 parent cbf3751 commit 627fa4f

File tree

65 files changed

+702
-437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+702
-437
lines changed

pom.xml

+68-24
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version='1.0' encoding='UTF-8'?>
1+
<?xml version="1.0" encoding="UTF-8"?>
22

33
<!--
44
Licensed to the Apache Software Foundation (ASF) under one
@@ -64,11 +64,13 @@ under the License.
6464

6565
<properties>
6666
<javaVersion>8</javaVersion>
67+
<aetherVersion>1.0.0.v20140518</aetherVersion>
6768
<mavenVersion>3.2.5</mavenVersion>
6869
<checkstyleVersion>9.3</checkstyleVersion>
6970
<doxiaVersion>1.11.1</doxiaVersion>
70-
<sitePluginVersion>3.9.1</sitePluginVersion>
71-
<surefire.version>2.22.2</surefire.version>
71+
<doxiaSitetoolsVersion>1.11.1</doxiaSitetoolsVersion>
72+
<sitePluginVersion>3.12.1</sitePluginVersion>
73+
<jxrPluginVersion>3.3.0</jxrPluginVersion>
7274
<project.build.outputTimestamp>2021-01-23T22:30:12Z</project.build.outputTimestamp>
7375
</properties>
7476

@@ -117,35 +119,33 @@ under the License.
117119
</dependency>
118120

119121
<!-- shared -->
122+
<dependency>
123+
<groupId>org.apache.maven.reporting</groupId>
124+
<artifactId>maven-reporting-api</artifactId>
125+
<version>3.1.1</version>
126+
</dependency>
120127
<dependency>
121128
<groupId>org.apache.maven.reporting</groupId>
122129
<artifactId>maven-reporting-impl</artifactId>
123-
<version>3.1.0</version>
124-
<exclusions>
125-
<exclusion>
126-
<groupId>org.apache.maven.doxia</groupId>
127-
<artifactId>*</artifactId>
128-
</exclusion>
129-
</exclusions>
130+
<version>3.2.0</version>
130131
</dependency>
131132

132133
<!-- doxia -->
133134
<dependency>
134135
<groupId>org.apache.maven.doxia</groupId>
135-
<artifactId>doxia-site-renderer</artifactId>
136+
<artifactId>doxia-sink-api</artifactId>
136137
<version>${doxiaVersion}</version>
137-
<exclusions>
138-
<exclusion>
139-
<artifactId>plexus-container-default</artifactId>
140-
<groupId>org.codehaus.plexus</groupId>
141-
</exclusion>
142-
</exclusions>
143138
</dependency>
144139
<dependency>
145140
<groupId>org.apache.maven.doxia</groupId>
146-
<artifactId>doxia-integration-tools</artifactId>
141+
<artifactId>doxia-core</artifactId>
147142
<version>${doxiaVersion}</version>
148143
</dependency>
144+
<dependency>
145+
<groupId>org.apache.maven.doxia</groupId>
146+
<artifactId>doxia-integration-tools</artifactId>
147+
<version>${doxiaSitetoolsVersion}</version>
148+
</dependency>
149149

150150
<!-- plexus -->
151151
<dependency>
@@ -168,11 +168,6 @@ under the License.
168168
<artifactId>plexus-utils</artifactId>
169169
<version>3.4.2</version>
170170
</dependency>
171-
<dependency>
172-
<groupId>org.codehaus.plexus</groupId>
173-
<artifactId>plexus-interpolation</artifactId>
174-
<version>1.26</version>
175-
</dependency>
176171
<dependency>
177172
<groupId>org.codehaus.plexus</groupId>
178173
<artifactId>plexus-velocity</artifactId>
@@ -208,17 +203,65 @@ under the License.
208203
</dependency>
209204

210205
<!-- test -->
206+
<dependency>
207+
<groupId>org.codehaus.plexus</groupId>
208+
<artifactId>plexus-container-default</artifactId>
209+
<version>2.1.1</version>
210+
<scope>test</scope>
211+
</dependency>
211212
<dependency>
212213
<groupId>junit</groupId>
213214
<artifactId>junit</artifactId>
214215
<version>4.13.2</version>
215216
<scope>test</scope>
216217
</dependency>
218+
<dependency>
219+
<groupId>org.slf4j</groupId>
220+
<artifactId>slf4j-simple</artifactId>
221+
<version>1.7.36</version>
222+
<scope>test</scope>
223+
</dependency>
217224
<dependency>
218225
<groupId>org.apache.maven.plugin-testing</groupId>
219226
<artifactId>maven-plugin-testing-harness</artifactId>
220227
<version>3.3.0</version>
221228
<scope>test</scope>
229+
<exclusions>
230+
<exclusion>
231+
<groupId>org.codehaus.plexus</groupId>
232+
<artifactId>plexus-container-default</artifactId>
233+
</exclusion>
234+
</exclusions>
235+
</dependency>
236+
<dependency>
237+
<groupId>org.eclipse.aether</groupId>
238+
<artifactId>aether-api</artifactId>
239+
<version>${aetherVersion}</version>
240+
<scope>test</scope>
241+
</dependency>
242+
<dependency>
243+
<groupId>org.eclipse.aether</groupId>
244+
<artifactId>aether-impl</artifactId>
245+
<version>${aetherVersion}</version>
246+
<scope>test</scope>
247+
</dependency>
248+
<dependency>
249+
<groupId>org.eclipse.aether</groupId>
250+
<artifactId>aether-connector-basic</artifactId>
251+
<version>${aetherVersion}</version>
252+
<scope>test</scope>
253+
</dependency>
254+
<dependency>
255+
<groupId>org.eclipse.aether</groupId>
256+
<artifactId>aether-transport-wagon</artifactId>
257+
<version>${aetherVersion}</version>
258+
<scope>test</scope>
259+
</dependency>
260+
<dependency>
261+
<groupId>org.apache.maven.wagon</groupId>
262+
<artifactId>wagon-http-lightweight</artifactId>
263+
<version>3.5.1</version>
264+
<scope>test</scope>
222265
</dependency>
223266
<dependency>
224267
<groupId>org.apache.maven</groupId>
@@ -335,6 +378,7 @@ under the License.
335378
<build>
336379
<plugins>
337380
<plugin>
381+
<groupId>org.apache.maven.plugins</groupId>
338382
<artifactId>maven-invoker-plugin</artifactId>
339383
<configuration>
340384
<goals>
@@ -376,7 +420,7 @@ under the License.
376420
</plugins>
377421
</reporting>
378422
</profile>
379-
423+
380424
<profile>
381425
<id>jdk9</id>
382426
<activation>

src/it/MCHECKSTYLE-129/pom.xml

+4-7
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ under the License.
2525
<version>1.0-SNAPSHOT</version>
2626
<name>checkstyle-new</name>
2727
<url>http://maven.apache.org</url>
28-
<properties>
29-
<checkstyleVersion>@pom.version@</checkstyleVersion>
30-
</properties>
3128
<dependencies>
3229
<dependency>
3330
<groupId>junit</groupId>
@@ -46,16 +43,16 @@ under the License.
4643
<plugin>
4744
<groupId>org.apache.maven.plugins</groupId>
4845
<artifactId>maven-checkstyle-plugin</artifactId>
49-
<version>${checkstyleVersion}</version>
50-
</plugin>
46+
<version>@project.version@</version>
47+
</plugin>
5148
</plugins>
52-
</build>
49+
</build>
5350
<reporting>
5451
<plugins>
5552
<plugin>
5653
<groupId>org.apache.maven.plugins</groupId>
5754
<artifactId>maven-checkstyle-plugin</artifactId>
58-
<version>${checkstyleVersion}</version>
55+
<version>@project.version@</version>
5956
<configuration>
6057
<configLocation>https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-8.28/src/main/resources/sun_checks.xml</configLocation>
6158
</configuration>

src/it/MCHECKSTYLE-131/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ under the License.
4343
<plugin>
4444
<groupId>org.apache.maven.plugins</groupId>
4545
<artifactId>maven-checkstyle-plugin</artifactId>
46-
<version>@pom.version@</version>
46+
<version>@project.version@</version>
4747
<configuration>
4848
<configLocation>checkstyle.xml</configLocation>
4949
</configuration>
5050
</plugin>
5151
</plugins>
5252
</build>
53-
</project>
53+
</project>

src/it/MCHECKSTYLE-137/pom.xml

+1-5
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,13 @@
3737
<plugin>
3838
<groupId>org.apache.maven.plugins</groupId>
3939
<artifactId>maven-checkstyle-plugin</artifactId>
40-
<version>@pom.version@</version>
41-
<configuration>
42-
<encoding>UTF-8</encoding>
43-
</configuration>
40+
<version>@project.version@</version>
4441
<executions>
4542
<execution>
4643
<id>validate</id>
4744
<phase>validate</phase>
4845
<configuration>
4946
<configLocation>checkstyle.xml</configLocation>
50-
<encoding>UTF-8</encoding>
5147
<consoleOutput>true</consoleOutput>
5248
<failsOnError>true</failsOnError>
5349
<linkXRef>false</linkXRef>

src/it/MCHECKSTYLE-169/pom.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ under the License.
3131

3232
<properties>
3333
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
34-
<checkstyleVersion>@project.version@</checkstyleVersion>
3534
</properties>
3635

3736
<build>
@@ -41,7 +40,7 @@ under the License.
4140
<inherited>true</inherited>
4241
<groupId>org.apache.maven.plugins</groupId>
4342
<artifactId>maven-checkstyle-plugin</artifactId>
44-
<version>${checkstyleVersion}</version>
43+
<version>@project.version@</version>
4544
</plugin>
4645
<plugin>
4746
<inherited>true</inherited>

src/it/MCHECKSTYLE-172/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@
4040
<plugin>
4141
<groupId>org.apache.maven.plugins</groupId>
4242
<artifactId>maven-checkstyle-plugin</artifactId>
43-
<version>@pom.version@</version>
43+
<version>@project.version@</version>
4444
</plugin>
4545
<plugin>
4646
<groupId>org.apache.maven.plugins</groupId>
4747
<artifactId>maven-site-plugin</artifactId>
4848
<version>@sitePluginVersion@</version>
49-
</plugin>
49+
</plugin>
5050
</plugins>
5151
</build>
5252
<reporting>
@@ -55,7 +55,7 @@
5555
<plugin>
5656
<groupId>org.apache.maven.plugins</groupId>
5757
<artifactId>maven-checkstyle-plugin</artifactId>
58-
<version>@pom.version@</version>
58+
<version>@project.version@</version>
5959
</plugin>
6060
</plugins>
6161
</reporting>

src/it/MCHECKSTYLE-173-with-charset/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<plugin>
4848
<groupId>org.apache.maven.plugins</groupId>
4949
<artifactId>maven-checkstyle-plugin</artifactId>
50-
<version>@pom.version@</version>
50+
<version>@project.version@</version>
5151
<configuration>
5252
<configLocation>checkstyle-with-charset.xml</configLocation>
5353
</configuration>

src/it/MCHECKSTYLE-173-without-charset/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<plugin>
4848
<groupId>org.apache.maven.plugins</groupId>
4949
<artifactId>maven-checkstyle-plugin</artifactId>
50-
<version>@pom.version@</version>
50+
<version>@project.version@</version>
5151
<configuration>
5252
<configLocation>checkstyle-without-charset.xml</configLocation>
5353
</configuration>

src/it/MCHECKSTYLE-193/pom.xml

+4-6
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@
3737
<plugin>
3838
<groupId>org.apache.maven.plugins</groupId>
3939
<artifactId>maven-checkstyle-plugin</artifactId>
40-
<version>@pom.version@</version>
40+
<version>@project.version@</version>
4141
<configuration>
42-
<encoding>UTF-8</encoding>
43-
<configLocation>checkstyle.xml</configLocation>
44-
<encoding>UTF-8</encoding>
45-
<consoleOutput>true</consoleOutput>
46-
<failsOnError>true</failsOnError>
42+
<configLocation>checkstyle.xml</configLocation>
43+
<consoleOutput>true</consoleOutput>
44+
<failsOnError>true</failsOnError>
4745
</configuration>
4846
<executions>
4947
<execution>

src/it/MCHECKSTYLE-219-no-license_failure/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<plugin>
4141
<groupId>org.apache.maven.plugins</groupId>
4242
<artifactId>maven-checkstyle-plugin</artifactId>
43-
<version>@pom.version@</version>
43+
<version>@project.version@</version>
4444
<executions>
4545
<execution>
4646
<id>check</id>

src/it/MCHECKSTYLE-219-no-license_success/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<plugin>
4141
<groupId>org.apache.maven.plugins</groupId>
4242
<artifactId>maven-checkstyle-plugin</artifactId>
43-
<version>@pom.version@</version>
43+
<version>@project.version@</version>
4444
<executions>
4545
<execution>
4646
<id>check</id>

src/it/MCHECKSTYLE-222-no-resources/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<plugin>
3232
<groupId>org.apache.maven.plugins</groupId>
3333
<artifactId>maven-checkstyle-plugin</artifactId>
34-
<version>@pom.version@</version>
34+
<version>@project.version@</version>
3535
</plugin>
3636
</plugins>
3737
</build>
@@ -42,7 +42,7 @@
4242
<plugin>
4343
<groupId>org.apache.maven.plugins</groupId>
4444
<artifactId>maven-checkstyle-plugin</artifactId>
45-
<version>@pom.version@</version>
45+
<version>@project.version@</version>
4646
<reportSets>
4747
<reportSet>
4848
<reports>

src/it/MCHECKSTYLE-222-resources/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<plugin>
3232
<groupId>org.apache.maven.plugins</groupId>
3333
<artifactId>maven-checkstyle-plugin</artifactId>
34-
<version>@pom.version@</version>
34+
<version>@project.version@</version>
3535
</plugin>
3636
</plugins>
3737
</build>
@@ -42,7 +42,7 @@
4242
<plugin>
4343
<groupId>org.apache.maven.plugins</groupId>
4444
<artifactId>maven-checkstyle-plugin</artifactId>
45-
<version>@pom.version@</version>
45+
<version>@project.version@</version>
4646
<reportSets>
4747
<reportSet>
4848
<reports>

src/it/MCHECKSTYLE-222-testResources/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<plugin>
3232
<groupId>org.apache.maven.plugins</groupId>
3333
<artifactId>maven-checkstyle-plugin</artifactId>
34-
<version>@pom.version@</version>
34+
<version>@project.version@</version>
3535
</plugin>
3636
</plugins>
3737
</build>
@@ -42,7 +42,7 @@
4242
<plugin>
4343
<groupId>org.apache.maven.plugins</groupId>
4444
<artifactId>maven-checkstyle-plugin</artifactId>
45-
<version>@pom.version@</version>
45+
<version>@project.version@</version>
4646
<reportSets>
4747
<reportSet>
4848
<reports>

src/it/MCHECKSTYLE-224/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ under the License.
3939
<plugin>
4040
<groupId>org.apache.maven.plugins</groupId>
4141
<artifactId>maven-jxr-plugin</artifactId>
42-
<version>2.4</version>
42+
<version>@jxrPluginVersion@</version>
4343
</plugin>
4444
<plugin>
4545
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)