Skip to content

Commit 53561fb

Browse files
committed
[MPIR-424] Upgrade Maven Reporting API to 3.1.1/Maven Reporting Impl to 3.2.0
1 parent a91b480 commit 53561fb

16 files changed

+37
-46
lines changed

pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ under the License.
124124
<mavenVersion>3.2.5</mavenVersion>
125125
<scmVersion>1.13.0</scmVersion>
126126
<aetherVersion>1.0.0.v20140518</aetherVersion>
127-
<sitePluginVersion>3.12.0</sitePluginVersion>
127+
<sitePluginVersion>3.12.1</sitePluginVersion>
128128
<fluidoSkinVersion>1.11.1</fluidoSkinVersion>
129129
<surefire.version>2.22.2</surefire.version>
130130
<checkstyle.violation.ignore>ParameterNumber,MethodLength</checkstyle.violation.ignore>
@@ -135,12 +135,12 @@ under the License.
135135
<dependency>
136136
<groupId>org.apache.maven.reporting</groupId>
137137
<artifactId>maven-reporting-api</artifactId>
138-
<version>3.1.0</version>
138+
<version>3.1.1</version>
139139
</dependency>
140140
<dependency>
141141
<groupId>org.apache.maven.reporting</groupId>
142142
<artifactId>maven-reporting-impl</artifactId>
143-
<version>3.1.0</version>
143+
<version>3.2.0</version>
144144
<exclusions>
145145
<exclusion>
146146
<groupId>org.apache.maven</groupId>

src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java

-23
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import java.util.ResourceBundle;
3535

3636
import org.apache.maven.artifact.repository.ArtifactRepository;
37-
import org.apache.maven.doxia.tools.SiteTool;
3837
import org.apache.maven.execution.MavenSession;
3938
import org.apache.maven.model.Plugin;
4039
import org.apache.maven.plugins.annotations.Component;
@@ -67,14 +66,6 @@ public abstract class AbstractProjectInfoReport
6766
// Mojo components
6867
// ----------------------------------------------------------------------
6968

70-
/**
71-
* SiteTool component.
72-
*
73-
* @since 2.1
74-
*/
75-
@Component
76-
protected SiteTool siteTool;
77-
7869
/**
7970
* Artifact Resolver component.
8071
*/
@@ -103,20 +94,6 @@ public abstract class AbstractProjectInfoReport
10394
@Parameter( defaultValue = "${session}", readonly = true, required = true )
10495
private MavenSession session;
10596

106-
/**
107-
* Local Repository.
108-
*/
109-
@Parameter( property = "localRepository", required = true, readonly = true )
110-
protected ArtifactRepository localRepository;
111-
112-
/**
113-
* Remote repositories used for the project.
114-
*
115-
* @since 2.1
116-
*/
117-
@Parameter( property = "project.remoteArtifactRepositories" )
118-
protected List<ArtifactRepository> remoteRepositories;
119-
12097
/**
12198
* Plugin repositories used for the project.
12299
*

src/test/java/org/apache/maven/report/projectinfo/AbstractProjectInfoTestCase.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public abstract class AbstractProjectInfoTestCase
4949
extends AbstractMojoTestCase
5050
{
5151
private ArtifactStubFactory artifactStubFactory;
52-
52+
5353
/**
5454
* The default locale is English.
5555
*/
@@ -77,7 +77,7 @@ protected void setUp()
7777

7878
artifactStubFactory = new DependencyArtifactStubFactory( getTestFile( "target" ), true, false );
7979
artifactStubFactory.getWorkingDir().mkdirs();
80-
80+
8181
// Set the default Locale
8282
Locale.setDefault( DEFAULT_LOCALE );
8383
}
@@ -180,7 +180,7 @@ protected AbstractProjectInfoReport createReportMojo( String goal, File pluginXm
180180
{
181181
AbstractProjectInfoReport mojo = (AbstractProjectInfoReport) lookupMojo( goal, pluginXmlFile );
182182
assertNotNull( "Mojo found.", mojo );
183-
183+
184184
LegacySupport legacySupport = lookup( LegacySupport.class );
185185
legacySupport.setSession( newMavenSession( new MavenProjectStub() ) );
186186
DefaultRepositorySystemSession repoSession =
@@ -199,11 +199,10 @@ protected File generateReport( AbstractProjectInfoReport mojo, File pluginXmlFil
199199
mojo.execute();
200200

201201
ProjectBuilder builder = lookup( ProjectBuilder.class );
202-
202+
203203
ProjectBuildingRequest buildingRequest = new DefaultProjectBuildingRequest();
204204
buildingRequest.setRepositorySession( lookup( LegacySupport.class ).getRepositorySession() );
205205

206-
assertNotNull( "Local repository", mojo.localRepository );
207206
testMavenProject = builder.build( pluginXmlFile, buildingRequest ).getProject();
208207

209208
File outputDir = mojo.getReportOutputDirectory();

src/test/java/org/apache/maven/report/projectinfo/CiManagementReportTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public void testReport()
6464
assertTrue( response.getContentLength() > 0 );
6565

6666
// Test the Page title
67-
String expectedTitle = getString( "report.ci-management.title" );
67+
String expectedTitle = prepareTitle( "ci mangement project info",
68+
getString( "report.ci-management.title" ) );
6869
assertEquals( expectedTitle, response.getTitle() );
6970

7071
// Test the texts

src/test/java/org/apache/maven/report/projectinfo/DependenciesReportTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public void testReport()
6464
assertTrue( response.getContentLength() > 0 );
6565

6666
// Test the Page title
67-
String expectedTitle = getString( "report.dependencies.title" );
67+
String expectedTitle = prepareTitle( "dependencies project info",
68+
getString( "report.dependencies.title" ) );
6869
assertEquals( expectedTitle, response.getTitle() );
6970

7071
// Test the tables

src/test/java/org/apache/maven/report/projectinfo/DependencyConvergenceReportTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ public void testReport()
6363
assertTrue( response.getContentLength() > 0 );
6464

6565
// Test the Page title
66-
String expectedTitle = getString( "report.dependency-convergence.reactor.title" );
66+
String expectedTitle = prepareTitle( "dependency convergence project info",
67+
getString( "report.dependency-convergence.reactor.title" ) );
6768
assertEquals( expectedTitle, response.getTitle() );
6869

6970
// Test the texts

src/test/java/org/apache/maven/report/projectinfo/DependencyManagementReportTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public void testReport()
6464
assertTrue( response.getContentLength() > 0 );
6565

6666
// Test the Page title
67-
String expectedTitle = getString( "report.dependency-management.title" );
67+
String expectedTitle = prepareTitle( "dependency management project info",
68+
getString( "report.dependency-management.title" ) );
6869
assertEquals( expectedTitle, response.getTitle() );
6970

7071
// Test the tables

src/test/java/org/apache/maven/report/projectinfo/IndexReportTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public void testReport()
6464

6565
// Test the Page title
6666
// Index does not have a 'name' but 'title' only
67-
String expectedTitle = getString( "report.index.title" );
67+
String expectedTitle = prepareTitle( "index project info",
68+
getString( "report.index.title" ) );
6869
assertEquals( expectedTitle, response.getTitle() );
6970

7071
// Test the texts

src/test/java/org/apache/maven/report/projectinfo/IssueManagementReportTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public void testReport()
6464
assertTrue( response.getContentLength() > 0 );
6565

6666
// Test the Page title
67-
String expectedTitle = getString( "report.issue-management.title" );
67+
String expectedTitle = prepareTitle( "issue management project info",
68+
getString( "report.issue-management.title" ) );
6869
assertEquals( expectedTitle, response.getTitle() );
6970

7071
// Test the links

src/test/java/org/apache/maven/report/projectinfo/LicensesReportTest.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public void testReport()
6464
assertTrue( response.getContentLength() > 0 );
6565

6666
// Test the Page title
67-
String expectedTitle = getString( "report.licenses.title" );
67+
String expectedTitle = prepareTitle( "licenses project info",
68+
getString( "report.licenses.title" ) );
6869
assertEquals( expectedTitle, response.getTitle() );
6970

7071
// Test the texts
@@ -98,7 +99,8 @@ public void testReportLinksOnly()
9899
assertTrue( response.getContentLength() > 0 );
99100

100101
// Test the Page title
101-
String expectedTitle = getString( "report.licenses.title" );
102+
String expectedTitle = prepareTitle( "licenses project info",
103+
getString( "report.licenses.title" ) );
102104
assertEquals( expectedTitle, response.getTitle() );
103105

104106
// Test the texts

src/test/java/org/apache/maven/report/projectinfo/MailingListsReportTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ public void testReport()
6565
assertTrue( response.getContentLength() > 0 );
6666

6767
// Test the Page title
68-
String expectedTitle = getString( "report.mailing-lists.title" );
68+
String expectedTitle = prepareTitle( "mailing lists project info",
69+
getString( "report.mailing-lists.title" ) );
6970
assertEquals( expectedTitle, response.getTitle() );
7071

7172
// Test the texts

src/test/java/org/apache/maven/report/projectinfo/ModulesReportTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ public void testReport()
8181
assertTrue( response.getContentLength() > 0 );
8282

8383
// Test the Page title
84-
String expectedTitle = getString( "report.modules.title" );
84+
String expectedTitle = prepareTitle( "modules project info",
85+
getString( "report.modules.title" ) );
8586
assertEquals( expectedTitle, response.getTitle() );
8687

8788
// Test the texts

src/test/java/org/apache/maven/report/projectinfo/PluginManagementReportTest.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ public void testReport()
101101
assertTrue( response.getContentLength() > 0 );
102102

103103
// Test the Page title
104-
String expectedTitle = getString( "report.plugin-management.title" );
104+
String expectedTitle = prepareTitle( "plugin management project info",
105+
getString( "report.plugin-management.title" ) );
105106
assertEquals( expectedTitle, response.getTitle() );
106107

107108
// Test the tables
@@ -139,7 +140,8 @@ public void testReportEclipseM2EPluginLifecycleMapping()
139140
assertTrue( response.getContentLength() > 0 );
140141

141142
// Test the Page title
142-
String expectedTitle = getString( "report.plugin-management.title" );
143+
String expectedTitle = prepareTitle( "plugin management project info",
144+
getString( "report.plugin-management.title" ) );
143145
assertEquals( expectedTitle, response.getTitle() );
144146

145147
// Test the tables

src/test/java/org/apache/maven/report/projectinfo/ScmReportTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ public void testReport()
6666
assertTrue( response.getContentLength() > 0 );
6767

6868
// Test the Page title
69-
String expectedTitle = getString( "report.scm.title" );
69+
String expectedTitle = prepareTitle( "scm project info",
70+
getString( "report.scm.title" ) );
7071
assertEquals( expectedTitle, response.getTitle() );
7172

7273
// Test the texts

src/test/java/org/apache/maven/report/projectinfo/SummaryReportTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ public void testReport()
6363
assertTrue( response.getContentLength() > 0 );
6464

6565
// Test the Page title
66-
String expectedTitle = getString( "report.summary.title" );
66+
String expectedTitle = prepareTitle( "summary project info",
67+
getString( "report.summary.title" ) );
6768
assertEquals( expectedTitle, response.getTitle() );
6869

6970
// Test the texts

src/test/java/org/apache/maven/report/projectinfo/TeamReportTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ public void testReport()
7070
assertTrue( response.getContentLength() > 0 );
7171

7272
// Test the Page title
73-
String expectedTitle = getString( "report.team.title" );
73+
String expectedTitle = prepareTitle( "team project info",
74+
getString( "report.team.title" ) );
7475
assertEquals( expectedTitle, response.getTitle() );
7576

7677
assertTrue( response.getText().contains( "gravatar" ));

0 commit comments

Comments
 (0)