You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bo...@apache.org on 2004/01/19 19:18:55 UTC

cvs commit: ant/src/main/org/apache/tools/ant/util TeeOutputStream.java

bodewig     2004/01/19 10:18:55

  Modified:    .        Tag: ANT_15_BRANCH build.xml
  Added:       docs/manual/OptionalTasks Tag: ANT_15_BRANCH scp.html
                        sshexec.html sshlib.html
               src/main/org/apache/tools/ant/taskdefs/optional/ssh Tag:
                        ANT_15_BRANCH AbstractSshMessage.java
                        Directory.java LogListener.java SSHBase.java
                        SSHExec.java SSHUserInfo.java Scp.java
                        ScpFromMessage.java ScpToMessage.java
               src/main/org/apache/tools/ant/util Tag: ANT_15_BRANCH
                        TeeOutputStream.java
  Log:
  Prepare for a library of SSH tasks compiled against 1.5.4
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.304.2.53 +129 -3    ant/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/ant/build.xml,v
  retrieving revision 1.304.2.52
  retrieving revision 1.304.2.53
  diff -u -r1.304.2.52 -r1.304.2.53
  --- build.xml	11 Aug 2003 06:08:28 -0000	1.304.2.52
  +++ build.xml	19 Jan 2004 18:18:54 -0000	1.304.2.53
  @@ -4,7 +4,7 @@
     =======================================================================
      Apache Ant own build file
   
  -   Copyright (c) 2000-2003 The Apache Software Foundation.  All rights
  +   Copyright (c) 2000-2004 The Apache Software Foundation.  All rights
      reserved.
   
     =======================================================================
  @@ -303,6 +303,22 @@
     <patternset id="teststhatfail">
     </patternset>
     
  +  <patternset id="needs.jsch">
  +    <exclude name="${optional.package}/ssh/*.java" unless="jsch.present"/>
  +  </patternset>
  +  <patternset id="ssh-lib">
  +    <exclude name="${optional.package}/ssh/*"/>
  +    <exclude name="${ant.package}/util/TeeOutputStream*"/>
  +  </patternset>
  +  <patternset id="ssh-lib-src">
  +    <exclude name="main/${optional.package}/ssh/*"/>
  +    <exclude name="main/${ant.package}/util/TeeOutputStream*"/>
  +  </patternset>
  +  <patternset id="ssh-lib-docs">
  +    <exclude name="manual/OptionalTasks/sshexec.html"/>
  +    <exclude name="manual/OptionalTasks/scp.html"/>
  +  </patternset>
  +
     <!--
          ===================================================================
            Set up a patternsets that matches the parts of our JUnit testsuite
  @@ -539,6 +555,9 @@
       <available property="beanshell.present"
                  classname="bsh.StringUtil"
                  classpathref="classpath"/>
  +    <available property="jsch.present"
  +               classname="com.jcraft.jsch.Session"
  +               classpathref="classpath"/>
     </target>
   
   
  @@ -612,6 +631,7 @@
         <patternset refid="needs.sun.b64"/>
         <patternset refid="needs.jakarta.bcel"/>
         <patternset refid="needs.swing"/>
  +      <patternset refid="needs.jsch"/>
       </javac>
   
       <copy todir="${build.classes}">
  @@ -661,6 +681,7 @@
       <jar destfile="${build.lib}/${name}.jar"
            basedir="${build.classes}"
            manifest="${manifest}">
  +      <patternset refid="ssh-lib"/>
         <exclude name="${optional.package}/**"/>
         <exclude name="${optional.type.package}/**"/>
         <exclude name="${util.package}/depend/**"/>
  @@ -700,6 +721,7 @@
       <jar destfile="${build.lib}/optional.jar"
            basedir="${build.classes}"
            manifest="${manifest}">
  +      <patternset refid="ssh-lib"/>
         <include name="${optional.package}/**"/>
         <include name="${optional.type.package}/**"/>
         <include name="${util.package}/depend/**"/>
  @@ -911,13 +933,16 @@
       </copy>
   
       <copy todir="${src.dist.src}">
  -      <fileset dir="${src.dir}"/>
  +      <fileset dir="${src.dir}">
  +        <patternset refid="ssh-lib-src"/>
  +      </fileset>
       </copy>
   
       <copy todir="${src.dist.docs}">
         <fileset dir="${docs.dir}">
           <exclude name="manual/api/**"/>
           <patternset refid="site.excludes"/>
  +        <patternset refid="ssh-lib-docs"/>
         </fileset>
       </copy>
   
  @@ -1150,7 +1175,8 @@
                windowtitle="${Name} API"
                doctitle="${Name}">
   
  -      <packageset dir="${java.dir}"/>
  +      <packageset dir="${java.dir}" 
  +        excludes="org/apache/tools/ant/taskdefs/optional/ssh"/>
   
         <tag name="todo" description="To do:" scope="all"/>
         <tag name="ant.task" enabled="false" description="Task:" scope="types"/>
  @@ -1448,4 +1474,104 @@
             description="--> creates a minimum distribution in ./dist"
             depends="dist-lite"/>
   
  +  <!--
  +       ===================================================================
  +         Creates the SSH tasks distribution, requires JSch on the CLASSPATH
  +       ===================================================================
  +  -->
  +  <target name="ssh-lib" depends="build" if="jsch.present">
  +    <property name="ssh.version" value="1.5-1.0"/>
  +    <property name="ssh.dist" 
  +      value="${dist.base}/ant-ssh-tasks-${ssh.version}"/>
  +    <mkdir dir="${ssh.dist}/tmp"/>
  +    <echo file="${ssh.dist}/tmp/sshtasks.properties">
  +scp=org.apache.tools.ant.taskdefs.optional.ssh.Scp
  +sshexec=org.apache.tools.ant.taskdefs.optional.ssh.SSHExec
  +    </echo>
  +
  +    <patternset id="ssh-lib-includes">
  +      <include name="${ant.package}/taskdefs/optional/ssh/*"/>
  +      <include name="${ant.package}/util/TeeOutputStream*"/>
  +    </patternset>
  +
  +    <mkdir dir="${ssh.dist}/lib"/>
  +    <jar destfile="${ssh.dist}/lib/ant-ssh.jar">
  +      <manifest>
  +        <section name="${ant.package}/taskdefs/optional/ssh">
  +          <attribute name="Extension-name"
  +                     value="org.apache.tools.ant.taskdefs.optional.ssh"/>
  +          <attribute name="Specification-Title"
  +                     value="Apache Ant SSH Tasks"/>
  +          <attribute name="Specification-Version"
  +                     value="${manifest-version}"/>
  +          <attribute name="Specification-Vendor"
  +                     value="Apache Software Foundation"/>
  +          <attribute name="Implementation-Title"
  +                     value="org.apache.tools.ant.taskdefs.optional.ssh"/>
  +          <attribute name="Implementation-Version"
  +                     value="${manifest-version}"/>
  +          <attribute name="Implementation-Vendor"
  +                     value="Apache Software Foundation"/>
  +        </section>
  +      </manifest>
  +      <fileset dir="${build.classes}">
  +        <patternset refid="ssh-lib-includes"/>
  +      </fileset>
  +      <zipfileset dir="${ssh.dist}/tmp" 
  +        prefix="${ant.package}/taskdefs/optional/ssh"/>
  +    </jar>
  +    <delete dir="${ssh.dist}/tmp"/>
  +
  +    <mkdir dir="${ssh.dist}/docs"/>
  +    <copy todir="${ssh.dist}/docs" flatten="true">
  +      <fileset dir="${docs.dir}">
  +        <include name="manual/OptionalTasks/sshexec.html"/>
  +        <include name="manual/OptionalTasks/scp.html"/>
  +      </fileset>
  +    </copy>
  +    <copy tofile="${ssh.dist}/docs/index.html"
  +        file="${docs.dir}/manual/OptionalTasks/sshlib.html"/>
  +
  +    <echo file="${ssh.dist}/README">
  +This distribution contains the &lt;sshexec&gt; and &lt;scp&gt; tasks
  +introduced in Ant 1.6.0 compiled against Ant 1.5.4.
  +
  +If you use Ant 1.6.0 or later, you don't need this file.
  +If you are using Ant 1.5.x, you should consider upgrading Ant.
  +
  +This distribution has only been tested against Ant 1.5.4 but should
  +work with Ant 1.5.2 or higher.
  +
  +The tasks in this library require additional software.  For details,
  +installation instructions and the task documentation see the docs
  +subdirectory.
  +
  +This software is licensed under the terms you may find in the file
  +named "LICENSE" in this directory.
  +
  +                                          The Apache Ant Project
  +                                         &lt;http://ant.apache.org/&gt;
  +    </echo>
  +    <copy todir="${ssh.dist}">
  +      <fileset dir=".">
  +        <include name="LICENSE"/>
  +      </fileset>
  +    </copy>
  +
  +    <mkdir dir="${ssh.dist}/src"/>
  +    <copy todir="${ssh.dist}/src">
  +      <fileset dir="${java.dir}">
  +        <patternset refid="ssh-lib-includes"/>
  +      </fileset>
  +    </copy>
  +    <zip destfile="${ssh.dist}.zip" basedir="${dist.base}"
  +	includes="ant-ssh-tasks-${ssh.version}/**"/>
  +    <tar destfile="${ssh.dist}.tar.gz" basedir="${dist.base}"
  +      compression="gzip" includes="ant-ssh-tasks-${ssh.version}/**"/>
  +    <delete dir="${ssh.dist}"/>
  +    <checksum fileext=".md5">
  +      <fileset dir="${dist.base}"
  +        includes="ant-ssh-tasks-${ssh.version}.*"/>
  +    </checksum>
  +  </target>
   </project>
  
  
  
  No                   revision
  No                   revision
  1.11.2.1  +3 -5      ant/docs/manual/OptionalTasks/scp.html
  
  Index: scp.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/manual/OptionalTasks/scp.html,v
  retrieving revision 1.11
  retrieving revision 1.11.2.1
  diff -u -r1.11 -r1.11.2.1
  --- scp.html	21 Nov 2003 08:16:41 -0000	1.11
  +++ scp.html	19 Jan 2004 18:18:54 -0000	1.11.2.1
  @@ -10,17 +10,15 @@
   <h2><a name="scp">SCP</a></h2>
   <h3>Description</h3>
   
  -<p><em>since Ant 1.6</em></p>
  -
   <p>Copies a file or FileSet to or from a remote machine running SSH daemon.
   FileSet <i>only</i> works for copying files from the local machine to a
   remote machine.</p>
   
   <p><b>Note:</b> This task depends on external libraries not included
   in the Ant distribution.  See <a
  -href="../install.html#librarydependencies">Library Dependencies</a>
  +href="index.html#librarydependencies">Library Dependencies</a>
   for more information.  This task has been tested with jsch-0.1.2 to
  -jsch-0.1.9.</p>
  +jsch-0.1.12.</p>
   
   <h3>Parameters</h3>
   <table border="1" cellpadding="2" cellspacing="0">
  @@ -171,7 +169,7 @@
   instead.
   </p>
   
  -<hr><p align="center">Copyright &copy; 2003 Apache Software Foundation.
  +<hr><p align="center">Copyright &copy; 2003-2004 Apache Software Foundation.
   All rights Reserved.</p>
   
   </body>
  
  
  
  1.9.2.1   +3 -5      ant/docs/manual/OptionalTasks/sshexec.html
  
  Index: sshexec.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/manual/OptionalTasks/sshexec.html,v
  retrieving revision 1.9
  retrieving revision 1.9.2.1
  diff -u -r1.9 -r1.9.2.1
  --- sshexec.html	21 Nov 2003 08:16:41 -0000	1.9
  +++ sshexec.html	19 Jan 2004 18:18:54 -0000	1.9.2.1
  @@ -10,16 +10,14 @@
   <h2><a name="sshexec">SSHEXEC</a></h2>
   <h3>Description</h3>
   
  -<p><em>since Ant 1.6</em></p>
  -
   <p>Runs a command on a remote machine running SSH daemon.
   </p>
   
   <p><b>Note:</b> This task depends on external libraries not included
   in the Ant distribution.  See <a
  -href="../install.html#librarydependencies">Library Dependencies</a>
  +href="index.html#librarydependencies">Library Dependencies</a>
   for more information.  This task has been tested with jsch-0.1.7 to
  -jsch-0.1.9 and won't work with versions of jsch earlier than
  +jsch-0.1.12 and won't work with versions of jsch earlier than
   0.1.7.</p>
   
   <h3>Parameters</h3>
  @@ -150,7 +148,7 @@
   </pre>
   </p>
   
  -<hr><p align="center">Copyright &copy; 2003 Apache Software Foundation.
  +<hr><p align="center">Copyright &copy; 2003-2004 Apache Software Foundation.
   All rights Reserved.</p>
   
   </body>
  
  
  
  1.1.2.1   +71 -0     ant/docs/manual/OptionalTasks/Attic/sshlib.html
  
  
  
  
  No                   revision
  No                   revision
  1.5.2.1   +0 -0      ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/AbstractSshMessage.java
  
  Index: AbstractSshMessage.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/AbstractSshMessage.java,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  
  
  
  1.2.4.1   +0 -0      ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Directory.java
  
  Index: Directory.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Directory.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  
  
  
  1.2.4.1   +0 -0      ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/LogListener.java
  
  Index: LogListener.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/LogListener.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  
  
  
  1.6.2.1   +0 -0      ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java
  
  Index: SSHBase.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  
  
  
  1.11.2.1  +1 -1      ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java
  
  Index: SSHExec.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java,v
  retrieving revision 1.11
  retrieving revision 1.11.2.1
  diff -u -r1.11 -r1.11.2.1
  
  
  
  1.4.2.1   +0 -0      ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHUserInfo.java
  
  Index: SSHUserInfo.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHUserInfo.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  
  
  
  1.10.2.1  +0 -0      ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java
  
  Index: Scp.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java,v
  retrieving revision 1.10
  retrieving revision 1.10.2.1
  diff -u -r1.10 -r1.10.2.1
  
  
  
  1.4.4.1   +0 -0      ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java
  
  Index: ScpFromMessage.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java,v
  retrieving revision 1.4
  retrieving revision 1.4.4.1
  diff -u -r1.4 -r1.4.4.1
  
  
  
  1.5.2.1   +0 -0      ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java
  
  Index: ScpToMessage.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  
  
  
  No                   revision
  No                   revision
  1.3.4.1   +0 -0      ant/src/main/org/apache/tools/ant/util/TeeOutputStream.java
  
  Index: TeeOutputStream.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/TeeOutputStream.java,v
  retrieving revision 1.3
  retrieving revision 1.3.4.1
  diff -u -r1.3 -r1.3.4.1
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org