You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2007/11/03 21:26:57 UTC

svn commit: r591675 - in /maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site: AbstractSiteMojo.java AbstractSiteRenderingMojo.java ReportDocumentRenderer.java SiteMojo.java SiteStageMojo.java

Author: dennisl
Date: Sat Nov  3 13:26:56 2007
New Revision: 591675

URL: http://svn.apache.org/viewvc?rev=591675&view=rev
Log:
o Fix some error reported by Checkstyle.

Modified:
    maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractSiteMojo.java
    maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractSiteRenderingMojo.java
    maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/ReportDocumentRenderer.java
    maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java
    maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteStageMojo.java

Modified: maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractSiteMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractSiteMojo.java?rev=591675&r1=591674&r2=591675&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractSiteMojo.java (original)
+++ maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractSiteMojo.java Sat Nov  3 13:26:56 2007
@@ -155,9 +155,9 @@
                 {
                     if ( !Arrays.asList( Locale.getAvailableLocales() ).contains( locale ) )
                     {
-                        getLog().warn( "The locale parsed defined by '" + locale +
-                            "' is not available in this Java Virtual Machine (" + System.getProperty( "java.version" ) +
-                            " from " + System.getProperty( "java.vendor" ) + ") - IGNORING" );
+                        getLog().warn( "The locale parsed defined by '" + locale
+                            + "' is not available in this Java Virtual Machine (" + System.getProperty( "java.version" )
+                            + " from " + System.getProperty( "java.vendor" ) + ") - IGNORING" );
                         continue;
                     }
 
@@ -343,8 +343,8 @@
             {
                 MavenProject reactorProject = (MavenProject) reactorItr.next();
 
-                if ( reactorProject != null && reactorProject.getParent() != null &&
-                    project.getArtifactId().equals( reactorProject.getParent().getArtifactId() ) )
+                if ( reactorProject != null && reactorProject.getParent() != null
+                    && project.getArtifactId().equals( reactorProject.getParent().getArtifactId() ) )
                 {
                     String reactorUrl = reactorProject.getUrl();
                     String name = reactorProject.getName();
@@ -556,8 +556,9 @@
         {
             // URLs, determine if they share protocol and domain info
 
-            if ( ( toUrl.getProtocol().equalsIgnoreCase( fromUrl.getProtocol() ) ) &&
-                ( toUrl.getHost().equalsIgnoreCase( fromUrl.getHost() ) ) && ( toUrl.getPort() == fromUrl.getPort() ) )
+            if ( ( toUrl.getProtocol().equalsIgnoreCase( fromUrl.getProtocol() ) )
+                && ( toUrl.getHost().equalsIgnoreCase( fromUrl.getHost() ) )
+                && ( toUrl.getPort() == fromUrl.getPort() ) )
             {
                 // shared URL domain details, use URI to determine relative path
 
@@ -611,8 +612,8 @@
         // check for the presence of windows drives. No relative way of
         // traversing from one to the other.
 
-        if ( ( toPath.startsWith( ":", 1 ) && fromPath.startsWith( ":", 1 ) ) &&
-            ( !toPath.substring( 0, 1 ).equals( fromPath.substring( 0, 1 ) ) ) )
+        if ( ( toPath.startsWith( ":", 1 ) && fromPath.startsWith( ":", 1 ) )
+            && ( !toPath.substring( 0, 1 ).equals( fromPath.substring( 0, 1 ) ) ) )
         {
             // they both have drive path element but they dont match, no
             // relative path
@@ -620,8 +621,8 @@
             return to;
         }
 
-        if ( ( toPath.startsWith( ":", 1 ) && !fromPath.startsWith( ":", 1 ) ) ||
-            ( !toPath.startsWith( ":", 1 ) && fromPath.startsWith( ":", 1 ) ) )
+        if ( ( toPath.startsWith( ":", 1 ) && !fromPath.startsWith( ":", 1 ) )
+            || ( !toPath.startsWith( ":", 1 ) && fromPath.startsWith( ":", 1 ) ) )
         {
 
             // one has a drive path element and the other doesnt, no relative
@@ -775,9 +776,9 @@
             {
                 MavenProject reactorProject = (MavenProject) reactorItr.next();
 
-                if ( reactorProject.getGroupId().equals( origParent.getGroupId() ) &&
-                    reactorProject.getArtifactId().equals( origParent.getArtifactId() ) &&
-                    reactorProject.getVersion().equals( origParent.getVersion() ) )
+                if ( reactorProject.getGroupId().equals( origParent.getGroupId() )
+                    && reactorProject.getArtifactId().equals( origParent.getArtifactId() )
+                    && reactorProject.getVersion().equals( origParent.getVersion() ) )
                 {
                     parentProject = reactorProject;
                     break;
@@ -791,9 +792,9 @@
                     MavenProject mavenProject = mavenProjectBuilder.build(
                         new File( aProject.getBasedir(), aProject.getModel().getParent().getRelativePath() ),
                         localRepository, null );
-                    if ( mavenProject.getGroupId().equals( origParent.getGroupId() ) &&
-                        mavenProject.getArtifactId().equals( origParent.getArtifactId() ) &&
-                        mavenProject.getVersion().equals( origParent.getVersion() ) )
+                    if ( mavenProject.getGroupId().equals( origParent.getGroupId() )
+                        && mavenProject.getArtifactId().equals( origParent.getArtifactId() )
+                        && mavenProject.getVersion().equals( origParent.getVersion() ) )
                     {
                         parentProject = mavenProject;
                     }
@@ -859,7 +860,8 @@
      * @return the site descriptor content with interpolate string
      * @throws IOException
      */
-    protected String getInterpolatedSiteDescriptorContent( Map props, MavenProject aProject, String siteDescriptorContent )
+    protected String getInterpolatedSiteDescriptorContent( Map props, MavenProject aProject,
+                                                           String siteDescriptorContent )
         throws IOException
     {
         // MSITE-201: The ObjectBasedValueSource( aProject ) below will match

Modified: maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractSiteRenderingMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractSiteRenderingMojo.java?rev=591675&r1=591674&r2=591675&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractSiteRenderingMojo.java (original)
+++ maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractSiteRenderingMojo.java Sat Nov  3 13:26:56 2007
@@ -230,7 +230,8 @@
             catch ( IOException e )
             {
                 throw new MojoExecutionException(
-                                                 "The site descriptor cannot interpolate properties: " + e.getMessage(), e );
+                                                 "The site descriptor cannot interpolate properties: " + e.getMessage(),
+                                                 e );
             }
 
             decoration = readDecorationModel( siteDescriptorContent );
@@ -427,8 +428,8 @@
                 // plugins with an earlier version to fail (most of the org.codehaus mojo now fails)
                 // be nice with them, output a warning and don't let them break anything
 
-                getLog().warn( "Error loading report " + report.getClass().getName() +
-                    " - AbstractMethodError: canGenerateReport()" );
+                getLog().warn( "Error loading report " + report.getClass().getName()
+                    + " - AbstractMethodError: canGenerateReport()" );
                 filteredReports.add( report );
             }
         }
@@ -545,7 +546,8 @@
             catch ( IOException e )
             {
                 throw new MojoExecutionException(
-                                                 "The site descriptor cannot interpolate properties: " + e.getMessage(), e );
+                                                 "The site descriptor cannot interpolate properties: " + e.getMessage(),
+                                                 e );
             }
 
             decorationModel = readDecorationModel( siteDescriptorContent );
@@ -584,8 +586,8 @@
             {
                 String displayLanguage = locale.getDisplayLanguage( Locale.ENGLISH );
 
-                getLog().info( "Skipped \"" + report.getName( locale ) + "\" report, file \"" + outputName +
-                    "\" already exists for the " + displayLanguage + " version." );
+                getLog().info( "Skipped \"" + report.getName( locale ) + "\" report, file \"" + outputName
+                    + "\" already exists for the " + displayLanguage + " version." );
                 i.remove();
             }
             else

Modified: maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/ReportDocumentRenderer.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/ReportDocumentRenderer.java?rev=591675&r1=591674&r2=591675&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/ReportDocumentRenderer.java (original)
+++ maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/ReportDocumentRenderer.java Sat Nov  3 13:26:56 2007
@@ -155,7 +155,7 @@
             {
                 List sinks = sf.sinks();
 
-                log.debug( "Multipage report: " + sinks.size() + " subreports");
+                log.debug( "Multipage report: " + sinks.size() + " subreports" );
 
                 for ( Iterator it = sinks.iterator(); it.hasNext(); )
                 {

Modified: maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java?rev=591675&r1=591674&r2=591675&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java (original)
+++ maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java Sat Nov  3 13:26:56 2007
@@ -32,7 +32,6 @@
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
-import java.util.HashMap;
 
 /**
  * Generates the project site.

Modified: maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteStageMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteStageMojo.java?rev=591675&r1=591674&r2=591675&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteStageMojo.java (original)
+++ maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteStageMojo.java Sat Nov  3 13:26:56 2007
@@ -93,8 +93,8 @@
             {
                 MavenProject reactorProject = (MavenProject) reactorItr.next();
 
-                if ( reactorProject != null && reactorProject.getParent() != null &&
-                    project.getArtifactId().equals( reactorProject.getParent().getArtifactId() ) )
+                if ( reactorProject != null && reactorProject.getParent() != null
+                    && project.getArtifactId().equals( reactorProject.getParent().getArtifactId() ) )
                 {
                     String structureReactorProject = getStructure( reactorProject, false );
                     reactorProject.setUrl( outputRelativePath + "/" + structureReactorProject );
@@ -137,8 +137,8 @@
             if ( !ignoreMissingSiteUrl )
             {
                 throw new MojoFailureException(
-                    "Missing site information in the distribution management element in the project: '" +
-                        project.getName() + "'." );
+                    "Missing site information in the distribution management element in the project: '"
+                    + project.getName() + "'." );
             }
 
             return null;