Author: vsiveton
Date: Wed Nov 17 23:11:56 2010
New Revision: 1036275
URL: http://svn.apache.org/viewvc?rev=1036275&view=rev
Log:
MPIR-128: Add a link to a repository location in Project Summary
o added a download section
Modified:
maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/ProjectSummaryReport.java
maven/plugins/trunk/maven-project-info-reports-plugin/src/main/resources/project-info-report.properties
maven/plugins/trunk/maven-project-info-reports-plugin/src/main/resources/project-info-report_fr.properties
Modified:
maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/ProjectSummaryReport.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/ProjectSummaryReport.java?rev=1036275&r1=1036274&r2=1036275&view=diff
==============================================================================
---
maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/ProjectSummaryReport.java
(original)
+++
maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/ProjectSummaryReport.java
Wed Nov 17 23:11:56 2010
@@ -20,6 +20,7 @@ package org.apache.maven.report.projecti
*/
import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.model.DistributionManagement;
import org.apache.maven.model.Organization;
import org.apache.maven.project.MavenProject;
import org.apache.maven.reporting.MavenReportException;
@@ -132,6 +133,33 @@ public class ProjectSummaryReport
endTable();
endSection();
+ // download section
+ DistributionManagement distributionManagement =
project.getDistributionManagement();
+ if ( distributionManagement != null )
+ {
+ if ( StringUtils.isNotEmpty(
distributionManagement.getDownloadUrl() ) )
+ {
+ startSection( getI18nString( "download" ) );
+ link( distributionManagement.getDownloadUrl(),
distributionManagement.getDownloadUrl() );
+ endSection();
+ }
+ else if ( distributionManagement.getRepository() != null
+ && StringUtils.isNotEmpty(
distributionManagement.getRepository().getUrl() ) )
+ {
+ startSection( getI18nString( "download" ) );
+ String link =
distributionManagement.getRepository().getUrl();
+ if ( !link.endsWith( "/" ) )
+ {
+ link += "/";
+ }
+ link += StringUtils.replace( project.getGroupId(), ".",
"/" );
+ link += "/";
+ link += project.getArtifactId();
+ link( link, link );
+ endSection();
+ }
+ }
+
endSection();
}
@@ -256,7 +284,8 @@ public class ProjectSummaryReport
// java files in the source directory?
try
{
- if ( FileUtils.getFileNames( new File(
project.getBuild().getSourceDirectory() ), "**/*.java", null, false ).size() >
0 )
+ if ( FileUtils.getFileNames( new File(
project.getBuild().getSourceDirectory() ), "**/*.java", null,
+ false ).size() > 0 )
{
return true;
}
Modified:
maven/plugins/trunk/maven-project-info-reports-plugin/src/main/resources/project-info-report.properties
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/src/main/resources/project-info-report.properties?rev=1036275&r1=1036274&r2=1036275&view=diff
==============================================================================
---
maven/plugins/trunk/maven-project-info-reports-plugin/src/main/resources/project-info-report.properties
(original)
+++
maven/plugins/trunk/maven-project-info-reports-plugin/src/main/resources/project-info-report.properties
Wed Nov 17 23:11:56 2010
@@ -198,6 +198,7 @@ report.summary.organization.url
report.summary.noorganization = This
project does not belong to an organization.
report.summary.title = Project
Summary
report.summary.value = Value
+report.summary.download = Download
report.team-list.contributors.actualtime = Actual
Time (GMT)
report.team-list.contributors.email = Email
report.team-list.contributors.intro = The
following additional people have contributed to this project through the way of
suggestions, patches or documentation.
Modified:
maven/plugins/trunk/maven-project-info-reports-plugin/src/main/resources/project-info-report_fr.properties
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/src/main/resources/project-info-report_fr.properties?rev=1036275&r1=1036274&r2=1036275&view=diff
==============================================================================
---
maven/plugins/trunk/maven-project-info-reports-plugin/src/main/resources/project-info-report_fr.properties
(original)
+++
maven/plugins/trunk/maven-project-info-reports-plugin/src/main/resources/project-info-report_fr.properties
Wed Nov 17 23:11:56 2010
@@ -194,6 +194,7 @@ report.summary.organization.url
report.summary.noorganization = Ce projet
n'appartient pas \u00e0 une organisation.
report.summary.title =
R\u00e9sum\u00e9 du projet
report.summary.value = Valeur
+report.summary.download =
T\u00e9l\u00e9chargement
report.team-list.contributors.actualtime = Heure
actuelle (GMT)
report.team-list.contributors.email = Courriel
report.team-list.contributors.intro = Les
personnes additionnelles suivantes ont contribu\u00e9 \u00e0 ce projet par
leurs suggestions, ou leurs apports \u00e0 la documentation ou des patches.