maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r407580 - in /maven/scm/trunk/maven-scm-plugin/src: main/java/org/apache/maven/scm/plugin/CheckoutMojo.java test/java/org/apache/maven/scm/plugin/CheckoutMojoTest.java test/java/org/apache/maven/scm/plugin/TagMojoTest.java
Date Thu, 18 May 2006 16:14:37 GMT
Author: evenisse
Date: Thu May 18 09:14:36 2006
New Revision: 407580

URL: http://svn.apache.org/viewvc?rev=407580&view=rev
Log:
Fix tests for reactor mode

Modified:
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java
    maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/CheckoutMojoTest.java
    maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/TagMojoTest.java

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=407580&r1=407579&r2=407580&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 May 18 09:14:36 2006
@@ -77,6 +77,11 @@
         return this.checkoutDirectory;
     }
 
+    public void setCheckoutDirectory( File checkoutDirectory )
+    {
+        this.checkoutDirectory = checkoutDirectory;
+    }
+
     protected void checkout()
         throws MojoExecutionException
     {

Modified: maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/CheckoutMojoTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/CheckoutMojoTest.java?rev=407580&r1=407579&r2=407580&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/CheckoutMojoTest.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/CheckoutMojoTest.java
Thu May 18 09:14:36 2006
@@ -55,6 +55,8 @@
         CheckoutMojo mojo = (CheckoutMojo) lookupMojo( "checkout", getTestFile(
             "src/test/resources/mojos/checkout/checkoutWhenCheckoutDirectoryExistsAndSkip.xml"
) );
 
+        mojo.setCheckoutDirectory( checkoutDir );
+
         mojo.execute();
 
         assertEquals( 0, checkoutDir.listFiles().length );
@@ -67,11 +69,14 @@
 
         CheckoutMojo mojo = (CheckoutMojo) lookupMojo( "checkout", getTestFile(
             "src/test/resources/mojos/checkout/checkoutWithConnectionUrl.xml" ) );
+        mojo.setWorkingDirectory( new File( getBasedir() ) );
 
         String connectionUrl = mojo.getConnectionUrl();
         connectionUrl = StringUtils.replace( connectionUrl, "${basedir}", getBasedir() );
         connectionUrl = StringUtils.replace( connectionUrl, "\\", "/" );
         mojo.setConnectionUrl( connectionUrl );
+
+        mojo.setCheckoutDirectory( checkoutDir );
 
         mojo.execute();
     }

Modified: maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/TagMojoTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/TagMojoTest.java?rev=407580&r1=407579&r2=407580&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/TagMojoTest.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/TagMojoTest.java
Thu May 18 09:14:36 2006
@@ -51,12 +51,15 @@
 
         CheckoutMojo checkoutMojo = (CheckoutMojo) lookupMojo( "checkout", getTestFile(
             "src/test/resources/mojos/checkout/checkoutWithConnectionUrl.xml" ) );
+        checkoutMojo.setWorkingDirectory( new File( getBasedir() ) );
 
         String connectionUrl = checkoutMojo.getConnectionUrl();
         connectionUrl = StringUtils.replace( connectionUrl, "${basedir}", getBasedir() );
         connectionUrl = StringUtils.replace( connectionUrl, "\\", "/" );
         checkoutMojo.setConnectionUrl( connectionUrl );
 
+        checkoutMojo.setCheckoutDirectory( checkoutDir );
+
         checkoutMojo.execute();
     }
 
@@ -75,6 +78,7 @@
 
         CheckoutMojo checkoutMojo =
             (CheckoutMojo) lookupMojo( "checkout", getTestFile( "src/test/resources/mojos/tag/checkout.xml"
) );
+        checkoutMojo.setWorkingDirectory( new File( getBasedir() ) );
 
         connectionUrl = checkoutMojo.getConnectionUrl();
         connectionUrl = StringUtils.replace( connectionUrl, "${basedir}", getBasedir() );
@@ -82,6 +86,8 @@
         checkoutMojo.setConnectionUrl( connectionUrl );
 
         File tagCheckoutDir = getTestFile( "target/tags/mytag" );
+        checkoutMojo.setCheckoutDirectory( tagCheckoutDir );
+
         assertFalse( new File( tagCheckoutDir, "pom.xml" ).exists() );
         checkoutMojo.execute();
         assertTrue( new File( tagCheckoutDir, "pom.xml" ).exists() );



Mime
View raw message