I am using ant version 1.5 I know that there is an scp command in ant 1.6 but
our plans do not have us moving to 1.6 for a while ( not the only application on
the box using ant / xml ). I am running in an IBM Unix environment. I am
attempting to get scp to work within an xml file called by ant.
Thank You for any support you may provide.
Sal Pantano
PLEASE NOTE -- SO THAT THE MAIL SYSTEM WOULD ACCEPT THIS MESSAGE -- In my
question where you see XX it represents a < where you see YY it represents
> xml sysntax.
This scp works. The ${formatted_report} is a fully defined file name (
abcdef.xml ) within the local directory. SCP finds the file and copies it to
the remote machine.
XX!--##############################--YY
XX!--### Copy report to wwwroot ###--YY
XX!--##############################--YY
XXproperty name="seccopy" location="/usr/bin/scp"/YY
XXexec executable="${seccopy}"YY
XXarg value="-rp"/YY
XXarg path="${formatted_report}"/YY
XXarg value="${ipname}:${publishReportsDir}"/YY
XX/execYY
Within the same xml file that is called by ant is this scp code. The problem I
am having is "${basedir}/reports/*.xsl" No matter how I put this
information scp puts out an error that there are no such file or directory
*.xsl. The directory is correct and there are xsl files in it. If I try the
scp command as a line command not within the xml file scp does find the *.xsl
files and does the copy. Within this code I have put in a fully qualified file
name ( abcdef.xsl ) and scp can find it and copy it. The problem is trying to
get the right syntax for the wildcard.
XX!--#################################--YY
XX!--### Copy xsl files to wwwroot ###--YY
XX!--#################################--YY
XXproperty name="seccopy_a" location="/usr/bin/scp"/YY
XXexec executable="${seccopy_a}"YY
XXarg value="-rp"/YY
XXarg file="${basedir}/reports/*.xsl"/YY
XXarg value="${ipname}:${publishReportsDir}"/YY
XX/execYY
On Tue, Jan 25, 2005 at 03:24:58PM -0500, Pantano, Salvatore wrote:> Within the same xml file that is called by ant is this scp code. > The problem I am having is "${basedir}/reports/*.xsl" No matter > how I put this information scp puts out an error that there are no > such file or directory *.xsl.I'm not familiar with ant, but this would happen if ant does not do globbing.. (expansion of wildcards matching multiple files)> The directory is correct and there are xsl files in it. If I try > the scp command as a line command not within the xml file scp does > find the *.xsl files and does the copy...whereas the shell does. There are several workarounds, one is; scp `find /dir/with/files -name '*.xsl' -print` user at remote:/dir/ //Peter