maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dant...@apache.org
Subject svn commit: r608636 - in /maven/scm/trunk/maven-scm-plugin: ./ src/main/java/org/apache/maven/scm/plugin/BootstrapMojo.java src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java
Date Thu, 03 Jan 2008 21:29:10 GMT
Author: dantran
Date: Thu Jan  3 13:29:09 2008
New Revision: 608636

URL: http://svn.apache.org/viewvc?rev=608636&view=rev
Log:
SCM-321:fix duplicate checkout during bootstrap

Modified:
    maven/scm/trunk/maven-scm-plugin/   (props changed)
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/BootstrapMojo.java
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java

Propchange: maven/scm/trunk/maven-scm-plugin/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Jan  3 13:29:09 2008
@@ -6,3 +6,4 @@
 *.ipr
 *.iws
 cobertura.ser
+.settings

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/BootstrapMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/BootstrapMojo.java?rev=608636&r1=608635&r2=608636&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/BootstrapMojo.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/BootstrapMojo.java
Thu Jan  3 13:29:09 2008
@@ -69,9 +69,10 @@
     {
         super.execute();
 
-        CheckOutScmResult result = checkout();
-
-        runGoals( result.getRelativePathProjectDirectory() );
+        if ( this.getCheckoutResult() != null )
+        {
+        	runGoals( this.getCheckoutResult().getRelativePathProjectDirectory() );
+        }
     }
 
     /**

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java?rev=608636&r1=608635&r2=608636&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java
Thu Jan  3 13:29:09 2008
@@ -69,15 +69,21 @@
      */
     private String scmVersion;
 
+    /**
+     * allow extended mojo (ie BootStrap ) to see checkout result
+     */
+    private CheckOutScmResult checkoutResult;
+    
     public void execute()
         throws MojoExecutionException
     {
         super.execute();
 
         //skip checkout if checkout directory is already created. See SCM-201
+        checkoutResult = null;
         if ( !getCheckoutDirectory().isDirectory() || !this.skipCheckoutIfExists )
         {
-            checkout();
+        	checkoutResult = checkout();
         }
     }
 
@@ -125,5 +131,10 @@
         {
             throw new MojoExecutionException( "Cannot run checkout command : ", e );
         }
+    }
+
+    protected CheckOutScmResult getCheckoutResult() 
+    {
+        return checkoutResult;
     }
 }



Mime
View raw message