Skip to content
This repository
Browse code

Add: support for wagon:upload goal by implementing

GitSiteWagon.put(source, destination)
  • Loading branch information...
commit ba0571654b94e24083177321c695adfc455e00b4 1 parent 7ef8d92
Ricardo Gladwell authored September 09, 2011
10  src/main/java/org/kathrynhuxtable/maven/wagon/gitsite/GitSiteWagon.java
@@ -529,7 +529,7 @@ public void connect(Repository repository, AuthenticationInfo authenticationInfo
529 529
      * @see org.apache.maven.wagon.Wagon#put(java.io.File, java.lang.String)
530 530
      */
531 531
     public void put(File source, String destination) throws TransferFailedException {
532  
-        throw new TransferFailedException("Not currently supported: put");
  532
+    	putResource(source, destination);
533 533
     }
534 534
 
535 535
     /**
@@ -541,7 +541,11 @@ public void putDirectory(File sourceDirectory, String destinationDirectory) thro
541 541
             throw new IllegalArgumentException("Source is not a directory: " + sourceDirectory);
542 542
         }
543 543
 
544  
-        Resource target = new Resource(destinationDirectory);
  544
+        putResource(sourceDirectory, destinationDirectory);
  545
+    }
  546
+
  547
+	private void putResource(File sourceDirectory, String destinationDirectory) throws TransferFailedException {
  548
+		Resource target = new Resource(destinationDirectory);
545 549
 
546 550
         firePutInitiated(target, sourceDirectory);
547 551
 
@@ -601,7 +605,7 @@ public void putDirectory(File sourceDirectory, String destinationDirectory) thro
601 605
         }
602 606
 
603 607
         firePutCompleted(target, sourceDirectory);
604  
-    }
  608
+	}
605 609
 
606 610
     /**
607 611
      * Check that the ScmResult was a successful operation

0 notes on commit ba05716

Please sign in to comment.
Something went wrong with that request. Please try again.