maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r907820 - in /maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo: ScmReport.java TeamListReport.java dependencies/renderer/DependenciesRenderer.java
Date Mon, 08 Feb 2010 22:08:14 GMT
Author: olamy
Date: Mon Feb  8 22:08:14 2010
New Revision: 907820

URL: http://svn.apache.org/viewvc?rev=907820&view=rev
Log:
[MPIR-178] some reports have inconsistent line ending style
removed hardcoded \n

Modified:
    maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/ScmReport.java
    maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/TeamListReport.java
    maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java

Modified: maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/ScmReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/ScmReport.java?rev=907820&r1=907819&r2=907820&view=diff
==============================================================================
--- maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/ScmReport.java
(original)
+++ maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/ScmReport.java
Mon Feb  8 22:08:14 2010
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.commons.lang.SystemUtils;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Scm;
@@ -481,9 +482,9 @@
 
                 StringBuffer sb = new StringBuffer();
                 sb.append( "[global]" );
-                sb.append( "\n" );
-                sb.append( "http-proxy-host = your.proxy.name" ).append( "\n" );
-                sb.append( "http-proxy-port = 3128" ).append( "\n" );
+                sb.append( SystemUtils.LINE_SEPARATOR );
+                sb.append( "http-proxy-host = your.proxy.name" ).append( SystemUtils.LINE_SEPARATOR
);
+                sb.append( "http-proxy-port = 3128" ).append( SystemUtils.LINE_SEPARATOR
);
                 verbatimText( sb.toString() );
 
                 endSection();
@@ -524,7 +525,7 @@
 
             StringBuffer command = new StringBuffer();
             command.append( "$ cvs -d " ).append( cvsRepo.getCvsRoot() ).append( " login"
);
-            command.append( "\n" );
+            command.append( SystemUtils.LINE_SEPARATOR );
             command.append( "$ cvs -z3 -d " ).append( cvsRepo.getCvsRoot() );
             command.append( " co " ).append( cvsRepo.getModule() );
 
@@ -570,7 +571,7 @@
 
             StringBuffer command = new StringBuffer();
             command.append( "$ cvs -d " ).append( cvsRoot ).append( " login" );
-            command.append( "\n" );
+            command.append( SystemUtils.LINE_SEPARATOR );
             command.append( "$ cvs -z3 -d " ).append( cvsRoot ).append( " co " ).append(
cvsRepo.getModule() );
 
             verbatimText( command.toString() );
@@ -627,7 +628,7 @@
             command.append( " -P password" );
             command.append( " " );
             command.append( perforceRepo.getPath() );
-            command.append( "\n" );
+            command.append( SystemUtils.LINE_SEPARATOR );
             command.append( "$ p4 submit -c \"A comment\"" );
 
             verbatimText( command.toString() );
@@ -656,7 +657,7 @@
             command.append( "$ stcmd co -x -nologo -stop -p " );
             command.append( fullUrl );
             command.append( " -is" );
-            command.append( "\n" );
+            command.append( SystemUtils.LINE_SEPARATOR );
             command.append( "$ stcmd ci -x -nologo -stop -p " );
             command.append( fullUrl );
             command.append( " -f NCI -is" );
@@ -775,12 +776,12 @@
                     if ( !isIntroAdded )
                     {
                         sb.append( "This SCM url '" + scmUrl + "' is invalid due to the following
errors:" );
-                        sb.append( "\n" );
+                        sb.append( SystemUtils.LINE_SEPARATOR );
                         isIntroAdded = true;
                     }
                     sb.append( " * " );
                     sb.append( msg );
-                    sb.append( "\n" );
+                    sb.append( SystemUtils.LINE_SEPARATOR );
                 }
 
                 if ( StringUtils.isNotEmpty( sb.toString() ) )

Modified: maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/TeamListReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/TeamListReport.java?rev=907820&r1=907819&r2=907820&view=diff
==============================================================================
--- maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/TeamListReport.java
(original)
+++ maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/TeamListReport.java
Mon Feb  8 22:08:14 2010
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.commons.lang.SystemUtils;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.model.Contributor;
 import org.apache.maven.model.Developer;
@@ -135,18 +136,18 @@
             startSection( i18n.getString( "project-info-report", locale, "report.team-list.intro.title"
) );
 
             // To handle JS
-            StringBuffer javascript = new StringBuffer( "function offsetDate(id, offset)
{\n" );
-            javascript.append( "    var now = new Date();\n" );
-            javascript.append( "    var nowTime = now.getTime();\n" );
-            javascript.append( "    var localOffset = now.getTimezoneOffset();\n" );
+            StringBuffer javascript = new StringBuffer( "function offsetDate(id, offset)
{" ).append( SystemUtils.LINE_SEPARATOR );
+            javascript.append( "    var now = new Date();" ).append( SystemUtils.LINE_SEPARATOR
);
+            javascript.append( "    var nowTime = now.getTime();" ).append( SystemUtils.LINE_SEPARATOR
);
+            javascript.append( "    var localOffset = now.getTimezoneOffset();" ).append(
SystemUtils.LINE_SEPARATOR );
             javascript.append( "    var developerTime = nowTime + ( offset * 60 * 60 * 1000
)"
-                               + "+ ( localOffset * 60 * 1000 );\n" );
-            javascript.append( "    var developerDate = new Date(developerTime);\n" );
-            javascript.append( "\n" );
-            javascript.append( "    document.getElementById(id).innerHTML = developerDate;\n"
);
-            javascript.append( "}\n" );
-            javascript.append( "\n" );
-            javascript.append( "function init(){\n" );
+                               + "+ ( localOffset * 60 * 1000 );" ).append( SystemUtils.LINE_SEPARATOR
);
+            javascript.append( "    var developerDate = new Date(developerTime);" ).append(
SystemUtils.LINE_SEPARATOR );
+            javascript.append( SystemUtils.LINE_SEPARATOR );
+            javascript.append( "    document.getElementById(id).innerHTML = developerDate;"
).append( SystemUtils.LINE_SEPARATOR );
+            javascript.append( "}" ).append( SystemUtils.LINE_SEPARATOR );
+            javascript.append( SystemUtils.LINE_SEPARATOR);
+            javascript.append( "function init(){" ).append( SystemUtils.LINE_SEPARATOR );
 
             // Introduction
             paragraph( i18n.getString( "project-info-report", locale, "report.team-list.intro.description1"
) );
@@ -227,7 +228,8 @@
             }
 
             // To handle JS
-            javascript.append( "}\n" ).append( "\n" ).append( "window.onLoad = init();\n"
);
+            javascript.append( "}" ).append( SystemUtils.LINE_SEPARATOR ).append( SystemUtils.LINE_SEPARATOR
)
+                .append( "window.onLoad = init();" ).append( SystemUtils.LINE_SEPARATOR );
             javaScript( javascript.toString() );
 
             endSection();
@@ -288,7 +290,7 @@
                 {
                     javascript.append( "    offsetDate('developer-" ).append( developerRow
).append( "', '" );
                     javascript.append( developer.getTimezone() );
-                    javascript.append( "');\n" );
+                    javascript.append( "');" ).append( SystemUtils.LINE_SEPARATOR );
                 }
                 sink.rawText( "</span>" );
                 sink.tableCell_();
@@ -360,7 +362,7 @@
                     javascript.append( "    offsetDate('contributor-" ).append( contributorRow
)
                         .append( "', '" );
                     javascript.append( contributor.getTimezone() );
-                    javascript.append( "');\n" );
+                    javascript.append( "');" ).append( SystemUtils.LINE_SEPARATOR );
                 }
                 sink.rawText( "</span>" );
                 sink.tableCell_();

Modified: maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java?rev=907820&r1=907819&r2=907820&view=diff
==============================================================================
--- maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java
(original)
+++ maven/plugins/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java
Mon Feb  8 22:08:14 2010
@@ -40,6 +40,7 @@
 import java.util.SortedSet;
 import java.util.TreeSet;
 
+import org.apache.commons.lang.SystemUtils;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -161,25 +162,25 @@
         {
             throw new RuntimeException( e );
         }
-
+        
         StringBuffer sb = new StringBuffer();
-        sb.append( "<script language=\"javascript\" type=\"text/javascript\">" ).append(
"\n" );
-        sb.append( "      function toggleDependencyDetail( divId, imgId )" ).append( "\n"
);
-        sb.append( "      {" ).append( "\n" );
-        sb.append( "        var div = document.getElementById( divId );" ).append( "\n" );
-        sb.append( "        var img = document.getElementById( imgId );" ).append( "\n" );
-        sb.append( "        if( div.style.display == '' )" ).append( "\n" );
-        sb.append( "        {" ).append( "\n" );
-        sb.append( "          div.style.display = 'none';" ).append( "\n" );
-        sb.append( "          img.src='" + IMG_INFO_URL + "';" ).append( "\n" );
-        sb.append( "        }" ).append( "\n" );
-        sb.append( "        else" ).append( "\n" );
-        sb.append( "        {" ).append( "\n" );
-        sb.append( "          div.style.display = '';" ).append( "\n" );
-        sb.append( "          img.src='" + IMG_CLOSE_URL + "';" ).append( "\n" );
-        sb.append( "        }" ).append( "\n" );
-        sb.append( "      }" ).append( "\n" );
-        sb.append( "</script>" ).append( "\n" );
+        sb.append( "<script language=\"javascript\" type=\"text/javascript\">" ).append(
SystemUtils.LINE_SEPARATOR );
+        sb.append( "      function toggleDependencyDetail( divId, imgId )" ).append( SystemUtils.LINE_SEPARATOR
);
+        sb.append( "      {" ).append( SystemUtils.LINE_SEPARATOR );
+        sb.append( "        var div = document.getElementById( divId );" ).append( SystemUtils.LINE_SEPARATOR
);
+        sb.append( "        var img = document.getElementById( imgId );" ).append( SystemUtils.LINE_SEPARATOR
);
+        sb.append( "        if( div.style.display == '' )" ).append( SystemUtils.LINE_SEPARATOR
);
+        sb.append( "        {" ).append( SystemUtils.LINE_SEPARATOR );
+        sb.append( "          div.style.display = 'none';" ).append( SystemUtils.LINE_SEPARATOR
);
+        sb.append( "          img.src='" + IMG_INFO_URL + "';" ).append( SystemUtils.LINE_SEPARATOR
);
+        sb.append( "        }" ).append( SystemUtils.LINE_SEPARATOR );
+        sb.append( "        else" ).append( SystemUtils.LINE_SEPARATOR );
+        sb.append( "        {" ).append( SystemUtils.LINE_SEPARATOR );
+        sb.append( "          div.style.display = '';" ).append( SystemUtils.LINE_SEPARATOR
);
+        sb.append( "          img.src='" + IMG_CLOSE_URL + "';" ).append( SystemUtils.LINE_SEPARATOR
);
+        sb.append( "        }" ).append( SystemUtils.LINE_SEPARATOR );
+        sb.append( "      }" ).append( SystemUtils.LINE_SEPARATOR );
+        sb.append( "</script>" ).append( SystemUtils.LINE_SEPARATOR );
         JAVASCRIPT = sb.toString();
     }
 



Mime
View raw message