how to use xml, scp, ant 1.5

Pantano, Salvatore Pantano.Salvatore at pennmutual.com
Wed Jan 26 07:24:58 EST 2005


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




More information about the openssh-unix-dev mailing list