maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mic...@apache.org
Subject cvs commit: maven-wagon/wagon-providers/ssh/src/main/resources/META-INF/plexus components.xml
Date Mon, 21 Jun 2004 17:16:22 GMT
michal      2004/06/21 10:16:22

  Modified:    wagon-providers/ssh/src/main/java/org/apache/maven/wagon/providers/ssh
                        ScpWagon.java
               wagon-providers/ssh/src/main/resources/META-INF/plexus
                        components.xml
  Added:       wagon-providers/ssh/src/main/java/org/apache/maven/wagon/providers/ssh
                        SshCommandExecutor.java
  Log:
  Not the best option probably - but I will use ScpWagon for executing remote commands. I
need this for deploying sites.
  
  Revision  Changes    Path
  1.8       +5 -5      maven-wagon/wagon-providers/ssh/src/main/java/org/apache/maven/wagon/providers/ssh/ScpWagon.java
  
  Index: ScpWagon.java
  ===================================================================
  RCS file: /home/cvs/maven-wagon/wagon-providers/ssh/src/main/java/org/apache/maven/wagon/providers/ssh/ScpWagon.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ScpWagon.java	3 Jun 2004 18:31:26 -0000	1.7
  +++ ScpWagon.java	21 Jun 2004 17:16:22 -0000	1.8
  @@ -54,7 +54,7 @@
    *
    */
   public class ScpWagon
  -    extends AbstractWagon
  +    extends AbstractWagon implements SshCommandExecutor
   {
       public static String EXEC_CHANNEL = "exec";
   
  @@ -194,7 +194,7 @@
           session.disconnect();
       }
   
  -    public void executeSimpleCommand( String command )
  +    public void executeCommand( String command )
           throws TransferFailedException
       {
           ChannelExec channel = null;
  @@ -229,7 +229,7 @@
       {
           String mkdirCmd = "mkdir -p " + getRepository().getBasedir() + "/" + PathUtils.dirname(
resource ) + "\n";
   
  -        executeSimpleCommand( mkdirCmd );
  +        executeCommand( mkdirCmd );
   
           ChannelExec channel = null;
   
  @@ -333,7 +333,7 @@
           {
               String chgrpCmd = "chgrp " + authInfo.getGroup() + " " + getRepository().getBasedir()
+ "/" + resource + "\n";
   
  -            executeSimpleCommand( chgrpCmd );
  +            executeCommand( chgrpCmd );
   
               // Need to change the mode as well.
   
  
  
  
  1.1                  maven-wagon/wagon-providers/ssh/src/main/java/org/apache/maven/wagon/providers/ssh/SshCommandExecutor.java
  
  Index: SshCommandExecutor.java
  ===================================================================
  package org.apache.maven.wagon.providers.ssh;
  
  import org.apache.maven.wagon.Wagon;
  import org.apache.maven.wagon.TransferFailedException;
  
  /**
   * @author <a href="mailto:mmaczka@interia.pl">Michal Maczka</a>
   *
   * @version $Id: SshCommandExecutor.java,v 1.1 2004/06/21 17:16:22 michal Exp $
   *
   */
  public interface SshCommandExecutor extends Wagon
  {
      void executeCommand( String command ) throws TransferFailedException;
  }
  
  
  
  1.2       +8 -1      maven-wagon/wagon-providers/ssh/src/main/resources/META-INF/plexus/components.xml
  
  Index: components.xml
  ===================================================================
  RCS file: /home/cvs/maven-wagon/wagon-providers/ssh/src/main/resources/META-INF/plexus/components.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- components.xml	30 Mar 2004 14:43:07 -0000	1.1
  +++ components.xml	21 Jun 2004 17:16:22 -0000	1.2
  @@ -4,7 +4,14 @@
         <role>org.apache.maven.wagon.Wagon</role>
         <role-hint>scp</role-hint>
         <implementation>org.apache.maven.wagon.providers.ssh.ScpWagon</implementation>
  -1      <instantiation-strategy>per-lookup</instantiation-strategy>
  +1     <instantiation-strategy>per-lookup</instantiation-strategy>
  +    </component>
  +  </components>
  +  <components>
  +    <component>
  +      <role>org.apache.maven.wagon.providers.ssh.SshCommandExecutor</role>
  +      <implementation>org.apache.maven.wagon.providers.ssh.ScpWagon</implementation>
  +1     <instantiation-strategy>per-lookup</instantiation-strategy>
       </component>
     </components>
   </component-set>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-cvs-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-cvs-help@maven.apache.org


Mime
View raw message