diff --git a/WHATSNEW b/WHATSNEW
index 10f3b2e7e..e2b9d860f 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -157,6 +157,9 @@ Other changes:
* The Copies a file or FileSet to or from a remote machine running SSH daemon.
+FileSet only works for copying files from the local machine to a
+remote machine. Note: This task depends on external libraries not included
+in the Ant distribution. See Library Dependencies
+for more information. FileSets are used to select
+sets of files to copy.
+ To use a fileset, the Copy a single local file to a remote machine Copy a single remote file to a local directory Copy a remote directory to a local directory Copy a local directory to a remote directory Copy a set of files to a directory Security Note: Hard coding passwords and/or usernames
+in scp task can be a serious security hole. Consider using variable
+substituion and include the password on the command line. For example:SCP
+Description
+Parameters
+
+
+
+
+ Attribute
+ Description
+ Required
+
+
+ file
+ The file to copy. This can be a local path or a
+ remote path of the form user:password@host:/directory/path.
+ Yes, unless a nested
+
+ <fileset>
element is used.
+
+ todir
+ The directory to copy to. This can be a local path
+ or a remote path of the form user:password@host:/directory/path
+ Yes
+
+
+ port
+ The port to connect to on the remote host.
+ No, defaults to 22.
+
+
+ trust
+ This trusts all unknown hosts if set to yes/true.
+ No, defaults to No.
+
+
+ knownhosts
+ This sets the known hosts file to use to validate
+ the identity of the remote host. This must be a SSH2 format file.
+ SSH1 format is not supported.
+ No, defaults to
+ ${user.dir}/.ssh/known_hosts.
+
+
+failonerror
+ Log a warning message, but do not stop the build,
+ when the transfer does not work.
+
+ No; defaults to true.
+ Parameters specified as nested elements
+
+fileset
+ todir
attribute must be set.Examples
+
+ <scp file="myfile.txt" todir="user:password@somehost:/home/chuck"/>
+
+
+ <scp file="user:password@somehost:/home/chuck/myfile.txt" todir="../some/other/dir"/>
+
+
+
+ <scp file="user:password@somehost:/home/chuck/*" todir="/home/sara" />
+
+
+
+ <scp todir="user:password@somehost:/home/chuck/">
+ <fileset dir="src_dir"/>
+ </scp>
+
+
+ <scp todir="user:password@somehost:/home/chuck">
+ <fileset dir="src_dir">
+ <include name="**/*.java"/>
+ </fileset>
+ </scp>
+
+ <scp todir="user:password@somehost:/home/chuck">
+ <fileset dir="src_dir" excludes="**/*.java"/>
+ </scp>
+
+
+
+
+ <scp todir="${username}:${password}@host:/dir" ...>
+
+Invoke ant with the following command line:
+
+ ant -Dusername=me -Dpassword=mypassword target1 target2
+
+
Unix Note: File permissions are not retained when files
+are copied; they end up with the default UMASK
permissions
+instead. This is caused by the lack of any means to query or set file
+permissions in the current Java runtimes. If you need a permission-
+preserving copy function, use <exec executable="scp" ... >
+instead.
+
Copyright © 2003 Apache Software Foundation. +All rights Reserved.
+ + + + diff --git a/docs/manual/install.html b/docs/manual/install.html index c5d4e3294..5f15ad2f9 100644 --- a/docs/manual/install.html +++ b/docs/manual/install.html @@ -418,6 +418,12 @@ Installing Ant / Optional Tasks section above. target="_top">http://gump.covalent.net/jars/latest/xml-commons/ for a nightly snapshot. +