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/05/01 22:11:04 UTC

svn commit: r1332804 - /maven/sandbox/trunk/plugins/maven-scm-publish-plugin/src/main/java/org/apache/maven/plugins/scmpublish/AbstractScmPublishMojo.java

Author: hboutemy
Date: Tue May  1 20:11:03 2012
New Revision: 1332804

URL: http://svn.apache.org/viewvc?rev=1332804&view=rev
Log:
removed reactorProjects which is AFAIK not really used but the result of release plugin copy, but this is a part inappropriate here

Modified:
    maven/sandbox/trunk/plugins/maven-scm-publish-plugin/src/main/java/org/apache/maven/plugins/scmpublish/AbstractScmPublishMojo.java

Modified: maven/sandbox/trunk/plugins/maven-scm-publish-plugin/src/main/java/org/apache/maven/plugins/scmpublish/AbstractScmPublishMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-scm-publish-plugin/src/main/java/org/apache/maven/plugins/scmpublish/AbstractScmPublishMojo.java?rev=1332804&r1=1332803&r2=1332804&view=diff
==============================================================================
--- maven/sandbox/trunk/plugins/maven-scm-publish-plugin/src/main/java/org/apache/maven/plugins/scmpublish/AbstractScmPublishMojo.java (original)
+++ maven/sandbox/trunk/plugins/maven-scm-publish-plugin/src/main/java/org/apache/maven/plugins/scmpublish/AbstractScmPublishMojo.java Tue May  1 20:11:03 2012
@@ -21,7 +21,6 @@ package org.apache.maven.plugins.scmpubl
 
 import java.io.File;
 import java.io.IOException;
-import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.io.FileUtils;
@@ -29,7 +28,6 @@ import org.apache.maven.execution.MavenS
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.project.MavenProject;
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.command.checkout.CheckOutScmResult;
@@ -41,8 +39,6 @@ import org.apache.maven.scm.repository.S
 import org.apache.maven.settings.Settings;
 import org.apache.maven.shared.release.config.ReleaseDescriptor;
 import org.apache.maven.shared.release.scm.ScmRepositoryConfigurator;
-import org.apache.maven.shared.release.util.ReleaseUtil;
-import org.codehaus.plexus.util.StringUtils;
 
 /**
  * Base class for the site-scm-publish mojos.
@@ -132,13 +128,6 @@ public abstract class AbstractScmPublish
     protected Settings settings;
 
     /**
-     * @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
      * various SCM providers provided via modello!
@@ -240,7 +229,6 @@ public abstract class AbstractScmPublish
     {
         logInfo( "Checking out the pub tree ..." );
 
-        MavenProject rootProject = ReleaseUtil.getRootProject( reactorProjects );
         if ( checkoutDirectory.exists() )
         {
             try
@@ -277,38 +265,6 @@ public abstract class AbstractScmPublish
             throw new MojoExecutionException( "An error is occurred in the checkout process: " + e.getMessage(), e );
         }
 
-        String scmRelativePathProjectDirectory = scmResult.getRelativePathProjectDirectory();
-        if ( StringUtils.isEmpty( scmRelativePathProjectDirectory ) )
-        {
-            String basedir;
-            try
-            {
-                basedir = ReleaseUtil.getCommonBasedir( reactorProjects );
-            }
-            catch ( IOException e )
-            {
-                throw new MojoExecutionException( "Exception occurred while calculating common basedir: "
-                    + e.getMessage(), e );
-            }
-
-            String rootProjectBasedir = rootProject.getBasedir().getAbsolutePath();
-            try
-            {
-                if ( ReleaseUtil.isSymlink( rootProject.getBasedir() ) )
-                {
-                    rootProjectBasedir = rootProject.getBasedir().getCanonicalPath();
-                }
-            }
-            catch ( IOException e )
-            {
-                throw new MojoExecutionException( e.getMessage(), e );
-            }
-            if ( rootProjectBasedir.length() > basedir.length() )
-            {
-                scmRelativePathProjectDirectory = rootProjectBasedir.substring( basedir.length() + 1 );
-            }
-        }
-
         if ( !scmResult.isSuccess() )
         {
             logError( scmResult.getProviderMessage() );