maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcconn...@apache.org
Subject svn commit: r563681 - in /maven/plugins/trunk/maven-patch-plugin: pom.xml src/main/java/org/apache/maven/plugin/patch/ApplyMojo.java
Date Tue, 07 Aug 2007 22:23:29 GMT
Author: jmcconnell
Date: Tue Aug  7 15:23:26 2007
New Revision: 563681

URL: http://svn.apache.org/viewvc?view=rev&rev=563681
Log:
update to p-u 1.4.2 and the more exacting cli code that john originally had

Modified:
    maven/plugins/trunk/maven-patch-plugin/pom.xml
    maven/plugins/trunk/maven-patch-plugin/src/main/java/org/apache/maven/plugin/patch/ApplyMojo.java

Modified: maven/plugins/trunk/maven-patch-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-patch-plugin/pom.xml?view=diff&rev=563681&r1=563680&r2=563681
==============================================================================
--- maven/plugins/trunk/maven-patch-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-patch-plugin/pom.xml Tue Aug  7 15:23:26 2007
@@ -36,12 +36,17 @@
      <url>http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-patch-plugin</url>
   </scm>
 
+  <prerequisites>
+    <maven>2.0.6</maven>
+  </prerequisites>
+
+
   <dependencies> 
   
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
-      <version>1.1</version>
+      <version>1.4.2</version>
     </dependency>
  
     <dependency>

Modified: maven/plugins/trunk/maven-patch-plugin/src/main/java/org/apache/maven/plugin/patch/ApplyMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-patch-plugin/src/main/java/org/apache/maven/plugin/patch/ApplyMojo.java?view=diff&rev=563681&r1=563680&r2=563681
==============================================================================
--- maven/plugins/trunk/maven-patch-plugin/src/main/java/org/apache/maven/plugin/patch/ApplyMojo.java
(original)
+++ maven/plugins/trunk/maven-patch-plugin/src/main/java/org/apache/maven/plugin/patch/ApplyMojo.java
Tue Aug  7 15:23:26 2007
@@ -28,6 +28,7 @@
 import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.Commandline;
 import org.codehaus.plexus.util.cli.StreamConsumer;
+import org.codehaus.plexus.util.cli.shell.BourneShell;
 //import org.codehaus.plexus.util.cli.shell.BourneShell;
 
 import java.io.File;
@@ -541,8 +542,8 @@
      */
     private Commandline createPatchCommand( File patchFile )
     {
-        Commandline cli = new Commandline();
-        //cli.setShell( new BourneShell() );
+        Commandline cli = new Commandline(); 
+        cli.setShell( new BourneShell() );
 
         cli.setExecutable( "patch" );
 
@@ -550,42 +551,34 @@
 
         if ( originalFile != null )
         {
-            cli.createArgument().setLine( originalFile.getAbsolutePath() );
-            //cli.createArg().setLine( originalFile.getAbsolutePath() );
+            cli.createArg().setLine( originalFile.getAbsolutePath() );
 
             if ( destFile != null )
             {
-                cli.createArgument().setLine( "-o " + destFile.getAbsolutePath() );
-                //cli.createArg().setLine( "-o " + destFile.getAbsolutePath() );
+                cli.createArg().setLine( "-o " + destFile.getAbsolutePath() );
             }
 
-            cli.createArgument().setValue( patchFile.getAbsolutePath() );
-            //cli.createArg().setLine( patchFile.getAbsolutePath() );
+            cli.createArg().setLine( patchFile.getAbsolutePath() );
         }
 
-        cli.createArgument().setLine( "-p" + strip  );
-        //cli.createArg().setLine( "-p" + strip );
+        cli.createArg().setLine( "-p" + strip );
 
         if ( ignoreWhitespace )
         {
-            cli.createArgument().setValue( "-l" );
-            //cli.createArg().setLine( "-l" );
+            cli.createArg().setLine( "-l" );
         }
 
         if ( reverse )
         {
-            cli.createArgument().setValue( "-R" );
-            //cli.createArg().setLine( "-R" );
+            cli.createArg().setLine( "-R" );
         }
 
         if ( backups )
         {
-            cli.createArgument().setValue( "-b" );
-            //cli.createArg().setLine( "-b" );
+            cli.createArg().setLine( "-b" );
         }
-
-        cli.createArgument().setLine( "-i " +  patchFile.getAbsolutePath() );
-        //cli.createArg().setLine( " < " + patchFile.getAbsolutePath() );
+        
+        cli.createArg().setLine( " < " + patchFile.getAbsolutePath() );
 
         return cli;
     }



Mime
View raw message