maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcconn...@apache.org
Subject svn commit: r552857 - in /maven/sandbox/trunk/plugins/maven-patch-plugin: pom.xml src/main/java/org/apache/maven/plugin/patch/ApplyMojo.java
Date Tue, 03 Jul 2007 14:45:43 GMT
Author: jmcconnell
Date: Tue Jul  3 07:45:42 2007
New Revision: 552857

URL: http://svn.apache.org/viewvc?view=rev&rev=552857
Log:
works with maven 2.0.5 now, sorta...fails on the return value atm

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

Modified: maven/sandbox/trunk/plugins/maven-patch-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-patch-plugin/pom.xml?view=diff&rev=552857&r1=552856&r2=552857
==============================================================================
--- maven/sandbox/trunk/plugins/maven-patch-plugin/pom.xml (original)
+++ maven/sandbox/trunk/plugins/maven-patch-plugin/pom.xml Tue Jul  3 07:45:42 2007
@@ -20,11 +20,13 @@
   </scm>
 
   <dependencies> 
+  
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
-      <version>1.4.2</version>
+      <version>1.1</version>
     </dependency>
+ 
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
@@ -37,7 +39,7 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
-  
+
   <profiles>
     <profile>
       <id>integration-tests</id>

Modified: maven/sandbox/trunk/plugins/maven-patch-plugin/src/main/java/org/apache/maven/plugin/patch/ApplyMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-patch-plugin/src/main/java/org/apache/maven/plugin/patch/ApplyMojo.java?view=diff&rev=552857&r1=552856&r2=552857
==============================================================================
--- maven/sandbox/trunk/plugins/maven-patch-plugin/src/main/java/org/apache/maven/plugin/patch/ApplyMojo.java
(original)
+++ maven/sandbox/trunk/plugins/maven-patch-plugin/src/main/java/org/apache/maven/plugin/patch/ApplyMojo.java
Tue Jul  3 07:45:42 2007
@@ -24,7 +24,8 @@
 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.Commandline.Argument;
+//import org.codehaus.plexus.util.cli.shell.BourneShell;
 
 import java.io.File;
 import java.io.FileWriter;
@@ -470,6 +471,8 @@
             getLog().debug( "Executing:\n" + cli + "\n" );
         }
 
+        getLog().info( Commandline.toString( cli.getShellCommandline() ) );
+        
         return CommandLineUtils.executeCommandLine( cli, out, err );
     }
 
@@ -534,7 +537,7 @@
     private Commandline createPatchCommand( File patchFile )
     {
         Commandline cli = new Commandline();
-        cli.setShell( new BourneShell() );
+        //cli.setShell( new BourneShell() );
 
         cli.setExecutable( "patch" );
 
@@ -542,34 +545,42 @@
 
         if ( originalFile != null )
         {
-            cli.createArg().setLine( originalFile.getAbsolutePath() );
+            cli.createArgument().setLine( originalFile.getAbsolutePath() );
+            //cli.createArg().setLine( originalFile.getAbsolutePath() );
 
             if ( destFile != null )
             {
-                cli.createArg().setLine( "-o " + destFile.getAbsolutePath() );
+                cli.createArgument().setLine( "-o " + destFile.getAbsolutePath() );
+                //cli.createArg().setLine( "-o " + destFile.getAbsolutePath() );
             }
 
-            cli.createArg().setLine( patchFile.getAbsolutePath() );
+            cli.createArgument().setValue( patchFile.getAbsolutePath() );
+            //cli.createArg().setLine( patchFile.getAbsolutePath() );
         }
 
-        cli.createArg().setLine( "-p" + strip );
+        cli.createArgument().setLine( "-p" + strip  );
+        //cli.createArg().setLine( "-p" + strip );
 
         if ( ignoreWhitespace )
         {
-            cli.createArg().setLine( "-l" );
+            cli.createArgument().setValue( "-l" );
+            //cli.createArg().setLine( "-l" );
         }
 
         if ( reverse )
         {
-            cli.createArg().setLine( "-R" );
+            cli.createArgument().setValue( "-R" );
+            //cli.createArg().setLine( "-R" );
         }
 
         if ( backups )
         {
-            cli.createArg().setLine( "-b" );
+            cli.createArgument().setValue( "-b" );
+            //cli.createArg().setLine( "-b" );
         }
 
-        cli.createArg().setLine( " < " + patchFile.getAbsolutePath() );
+        cli.createArgument().setLine( " < " + patchFile.getAbsolutePath() );
+        //cli.createArg().setLine( " < " + patchFile.getAbsolutePath() );
 
         return cli;
     }



Mime
View raw message