>I dont know if there is enough evidence to distinguish a bug in ant from 
some FTP server config.
   
  I am pritty sure it is a bug with Apache Ant ftp-task, becuase I am 
overcomming this invoking directly the class:
   
  org.apache.commons.net.ftp.FTPClient
   
  I can't use wildcards, because I am trying to get the files from a host 
machine so the '-syntax has special meaning. So I need it.
   
  The file exist and I get it using FTPClient, my problem comes when invoking 
the ftp ant task only. The source code is dificult to understand, but in some 
way the delimitors are eliminated.
   
  Thanks any way,
   
  David

David wrote:
> (Read this message, it is more readeable)
> 
> I have to get a file from the server, 
> but the name has to be encloses by '   symbol, for example: 
> 'foo.txt', but Ant process the file name an eliminates the   
> delimitors. I have tested the ftp action with a file without ' 
> on its name and   it works.    It is a problem with the ftp task and not 
> with the fileSet definition, I guess   because I have tried to use the 
> '-symbol on the name for making a copy of the   file and it works (see below) 
>    
> I am sending to you a piece of code in orde to see more clear:
> 
> <target name="get-input-files" 
> depends="get-current-time"          
> > 
> <echo level="verbose"            
> message= "Getting file: '${holder.prefix}${current.time}' from   server: \
> ${server}"/>           <copy file="'borrame.txt'" 
> tofile="'nuevo_borrame.txt'"/>    \
>  <ftp action="get"              
> server="${server}"             
> userid="${login}"
> password="${password}"              
> verbose="yes"              
> binary = "false"              
> > 
> <fileset dir=".">                
> <include name="BORRAME.TXT"/>                
> <include name="'PRVL.JSCHIT.L3BSCHI2.SALIDA.NNBAA.D060404'"/>              
> </fileset>              
> <!--fileset file="'${holder.prefix}${current.time}'"/-->          
> </ftp>      
> </target>  
> 
> and I get the following output in debug mode:    
> get-input-files:       
> [echo] Getting file: 'PRVL.JSCHIT.L3BSCHI2.SALIDA.NNBAA.D060404' from   
> server: \
> aris.bsch        [copy] P:\LRA\src\resource\'borrame.txt' omitted as   \
> P:\LRA\src\resource\'nuevo_borrame.txt' is up to date.         [ftp] Opening 
> FTP \
> connection to aris.bsch         [ftp] connected        
> [ftp] logging in to FTP server        
> [ftp] login succeeded        
> [ftp] getting files  Could not load a dependent class \
> (com/sun/media/jai/codec/FileSeekableStream)   for type image  Could not load 
> a \
> dependent class (com/jcraft/jsch/UserInfo) for type sshexec   Could not load 
> a \
> dependent class (com/jcraft/jsch/UserInfo) for type scp   Could not load a \
> dependent class (jdepend/xmlui/JDepend) for type jdepend  fileset:  Setup 
> scanner \
> in dir P:\LRA\src\resource with patternSet{ includes:    [BORRAME.TXT, \
> PRVL.JSCHIT.L3BSCHI2.SALIDA.NNBAA.D060404] excludes: [] }   filelist map used 
> in \
> listing files  filelist map used in listing files   filelist map used in 
> listing \
> files         [ftp] transferring BORRAME.TXT to 
> P:\LRA\src\resource\BORRAME.TXT     \
>  [ftp] File P:\LRA\src\resource\BORRAME.TXT copied from aris.bsch        
> [ftp] 1 files retrieved        
> [ftp] disconnecting    
> BUILD SUCCESSFUL      
> 
> as you can see the file name is changed for the ftp task but not for the copy 
>   \
> task. WHY????     Please let me know if the is any shortcut solution for this 
> \
> problem in the mean    time you solve it for the next release.    
> 
> Thanks,    
> 
> David

> P.D.: I have reported this possible bug on:
> http://issues.apache.org/bugzilla/show_bug.cgi?id=39204


                
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.

Reply via email to