You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2012/02/27 23:28:30 UTC

svn commit: r1294371 - /maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/

Author: hboutemy
Date: Mon Feb 27 22:28:30 2012
New Revision: 1294371

URL: http://svn.apache.org/viewvc?rev=1294371&view=rev
Log:
code formatting

Modified:
    maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/AbstractSvnpubsubMojo.java
    maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubInventory.java
    maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubInventoryMojo.java
    maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubLifecycleMojo.java
    maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubPublishMojo.java

Modified: maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/AbstractSvnpubsubMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/AbstractSvnpubsubMojo.java?rev=1294371&r1=1294370&r2=1294371&view=diff
==============================================================================
--- maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/AbstractSvnpubsubMojo.java (original)
+++ maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/AbstractSvnpubsubMojo.java Mon Feb 27 22:28:30 2012
@@ -64,6 +64,7 @@ public abstract class AbstractSvnpubsubM
      *            default-value="${project.build.directory}/svnpubsub-inventory.js"
      */
     protected File inventoryFile;
+
     /**
      * Location of the svn publication tree.
      * 
@@ -71,6 +72,7 @@ public abstract class AbstractSvnpubsubM
      * @required
      */
     protected String pubScmUrl;
+
     /**
      * Location of the svn publication tree.
      * 
@@ -78,12 +80,14 @@ public abstract class AbstractSvnpubsubM
      *            default-value="${project.build.directory}/svnpubsub-checkout"
      */
     protected File checkoutDirectory;
+
     /**
      * Patterns to exclude from the scm tree.
      * 
      * @parameter
      */
     protected String excludes;
+
     /**
      * Patterns to include in the scm tree.
      * 
@@ -104,44 +108,49 @@ public abstract class AbstractSvnpubsubM
      * @component
      */
     private ScmManager scmManager;
-    
-    
+
     /**
      * Tool that gets a configured SCM repository from release configuration.
      * 
      * @component
      */
     protected ScmRepositoryConfigurator scmRepositoryConfigurator;
+
     /**
      * The SCM username to use.
      * 
      * @parameter expression="${username}"
      */
     protected String username;
+
     /**
      * The SCM password to use.
      * 
      * @parameter expression="${password}"
      */
     protected String password;
+
     /**
      * @parameter expression="${settings}"
      * @required
      * @readonly
      */
     protected Settings settings;
+
     /**
      * @parameter expression="${project}"
      * @required
      * @readonly
      */
     protected MavenProject project;
+
     /**
      * @parameter expression="${reactorProjects}"
      * @required
      * @readonly
      */
     protected List<MavenProject> reactorProjects;
+
     /**
      * Use a local checkout instead of doing a checkout from the upstream repository. ATTENTION: This will only work
      * with distributed SCMs which support the file:// protocol TODO: we should think about having the defaults for the
@@ -151,19 +160,21 @@ public abstract class AbstractSvnpubsubM
      * @since 2.0
      */
     protected boolean localCheckout;
+
     /**
      * @parameter expression="${basedir}"
      * @required
      * @readonly
      */
     protected File basedir;
+
     /**
      * @parameter expression="${session}"
      * @readonly
      * @required
      */
     protected MavenSession session;
-    
+
     /**
      * The outputEncoding parameter of the site plugin. This plugin will corrupt your site
      * if this does not match the value used by the site plugin.
@@ -171,7 +182,7 @@ public abstract class AbstractSvnpubsubM
      * @parameter expression="${outputEncoding}" 
      */
     protected String siteOutputEncoding;
-    
+
     protected ScmProvider scmProvider;
     protected ScmRepository scmRepository;
     // a list (ordered) to maintain sort for ease of comparison.
@@ -223,7 +234,7 @@ public abstract class AbstractSvnpubsubM
         Collections.sort( inventory );
         SvnpubsubInventory initialInventory = new SvnpubsubInventory();
         Set<String> paths = new HashSet<String>();
-        
+
         /*
          * It might be cleverer to store paths relative to the checkoutDirectory, but this really should work.
          */
@@ -252,7 +263,7 @@ public abstract class AbstractSvnpubsubM
             throw new MojoFailureException( "Failed to write inventory to " + inventoryFile.getAbsolutePath(), e );
         }
     }
-    
+
     protected void readInventory()
         throws MojoFailureException
     {
@@ -286,28 +297,28 @@ public abstract class AbstractSvnpubsubM
         {
             // in the release phase we have to change the checkout URL
             // to do a local checkout instead of going over the network.
-    
+
             // the first step is a bit tricky, we need to know which provider! like e.g. "scm:jgit:http://"
             // the offset of 4 is because 'scm:' has 4 characters...
             String providerPart = pubScmUrl.substring( 0, pubScmUrl.indexOf( ':', 4 ) );
-    
+
             // X TODO: also check the information from releaseDescriptor.getScmRelativePathProjectDirectory()
             // X TODO: in case our toplevel git directory has no pom.
             // X TODO: fix pathname once I understand this.
             scmUrl = providerPart + ":file://" + "target/localCheckout";
             logInfo( "Performing a LOCAL checkout from " + scmUrl );
         }
-    
+
         ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
         releaseDescriptor.setInteractive( settings.isInteractiveMode() );
-    
+
         releaseDescriptor.setScmPassword( password );
         releaseDescriptor.setScmUsername( username );
-    
+
         releaseDescriptor.setWorkingDirectory( basedir.getAbsolutePath() );
         releaseDescriptor.setLocalCheckout( localCheckout );
         releaseDescriptor.setScmSourceUrl( pubScmUrl );
-        
+
         if ( providerImplementations != null )
         {
             for ( Map.Entry<String, String> providerEntry : providerImplementations.entrySet() )
@@ -317,24 +328,24 @@ public abstract class AbstractSvnpubsubM
                 scmManager.setScmProviderImplementation( providerEntry.getKey(), providerEntry.getValue() );
             }
         }
-    
+
         try
         {
             scmRepository = scmRepositoryConfigurator.getConfiguredRepository( releaseDescriptor, settings );
-    
+
             scmProvider = scmRepositoryConfigurator.getRepositoryProvider( scmRepository );
         }
         catch ( ScmRepositoryException e )
         {
             // TODO: rethink this error pattern.
             logError( e.getMessage() );
-    
+
             throw new ReleaseScmRepositoryException( e.getMessage(), e.getValidationMessages() );
         }
         catch ( NoSuchScmProviderException e )
         {
             logError( e.getMessage() );
-    
+
             throw new ReleaseExecutionException( "Unable to configure SCM repository: " + e.getMessage(), e );
         }
         return releaseDescriptor;

Modified: maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubInventory.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubInventory.java?rev=1294371&r1=1294370&r2=1294371&view=diff
==============================================================================
--- maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubInventory.java (original)
+++ maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubInventory.java Mon Feb 27 22:28:30 2012
@@ -29,7 +29,7 @@ import java.util.Set;
 public class SvnpubsubInventory
 {
     private Set<String> paths;
-    
+
     public SvnpubsubInventory() 
     {
         paths = new HashSet<String>(); 

Modified: maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubInventoryMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubInventoryMojo.java?rev=1294371&r1=1294370&r2=1294371&view=diff
==============================================================================
--- maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubInventoryMojo.java (original)
+++ maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubInventoryMojo.java Mon Feb 27 22:28:30 2012
@@ -133,7 +133,7 @@ public class SvnpubsubInventoryMojo
                 scmRelativePathProjectDirectory = rootProjectBasedir.substring( basedir.length() + 1 );
             }
         }
-        
+
         // I don't seem to be using this. 
         releaseDescriptor.setScmRelativePathProjectDirectory( scmRelativePathProjectDirectory );
 
@@ -177,7 +177,6 @@ public class SvnpubsubInventoryMojo
         catch ( ReleaseFailureException e )
         {
             throw new MojoFailureException( e.getMessage() );
-
         }
     }
 }

Modified: maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubLifecycleMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubLifecycleMojo.java?rev=1294371&r1=1294370&r2=1294371&view=diff
==============================================================================
--- maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubLifecycleMojo.java (original)
+++ maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubLifecycleMojo.java Mon Feb 27 22:28:30 2012
@@ -36,7 +36,6 @@ public class SvnpubsubLifecycleMojo
         throws MojoExecutionException, MojoFailureException
     {
         // nothing to do. This only purpose here is to set loose the lifecycle.
-        
     }
 
 }

Modified: maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubPublishMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubPublishMojo.java?rev=1294371&r1=1294370&r2=1294371&view=diff
==============================================================================
--- maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubPublishMojo.java (original)
+++ maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/SvnpubsubPublishMojo.java Mon Feb 27 22:28:30 2012
@@ -67,13 +67,13 @@ public class SvnpubsubPublishMojo
      * @parameter expression="${svnpubsub.skipCheckin}"
      */
     private boolean skipCheckin;
-    
+
     /**
      * SCM log/checkin comment for this publication.
      * @parameter expression="${svnpubsub.checkinComment}"
      */
     private String checkinComment;
-    
+
     private File relativize( File base, File file )
     {
         return new File( base.toURI().relativize( file.toURI() ).getPath() );
@@ -197,7 +197,7 @@ public class SvnpubsubPublishMojo
                 {
                     throw new MojoFailureException( "Failed to normalize newlines in " + f.getAbsolutePath() );
                 }
-                
+
                 for ( File dir = f.getParentFile() ; !dir.equals(checkoutDirectory) ; dir = dir.getParentFile() ) 
                 {
                     File relativized = relativize( checkoutDirectory, dir);
@@ -210,9 +210,9 @@ public class SvnpubsubPublishMojo
                 }
                 addedList.add( relativize( checkoutDirectory, f) );
             }
-            
+
             Collections.sort( dirsToAdd );
-                
+
             for ( File relativized : dirsToAdd )
             {
                 try 
@@ -229,7 +229,7 @@ public class SvnpubsubPublishMojo
                     //
                 }
             }
-            
+
             ScmFileSet addedFileSet = new ScmFileSet( checkoutDirectory, addedList );
             try
             {
@@ -273,7 +273,7 @@ public class SvnpubsubPublishMojo
                 throw new MojoExecutionException( "Failed to delete removed files to SCM", e );
             }
         }
-        
+
         for ( File f : updated )
         {
             try
@@ -285,7 +285,7 @@ public class SvnpubsubPublishMojo
                 throw new MojoFailureException( "Failed to normalize newlines in " + f.getAbsolutePath() );
             }
         }
-        
+
         if ( !skipCheckin )
         {
             if ( checkinComment == null )