SHARE
TWEET

Untitled

a guest May 31st, 2017 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="ant-project" default="build">
  3.    
  4.    
  5.    
  6.     <description>
  7.             Ant task to download drug info from Medispan
  8.     </description>
  9.    
  10.     <taskdef resource="net/sf/antcontrib/antcontrib.properties" />
  11.    
  12.    
  13.     <taskdef name="truncate_tables" classname="db_transfer.truncate" classpath="C:\\app\\workspace\\drxworkspace\\Ant_Drug_Download\\bin\\db_transfer"/>
  14.  
  15.     <tstamp>
  16.         <format property="TODAY_US" pattern="yyyyMM" locale="en,US"/>
  17.       </tstamp>
  18.  
  19.     <!-- =================================
  20.           target: build              
  21.          ================================= -->
  22.  
  23.    
  24.     <target name="build">
  25.  
  26.         <ftp action ="get"
  27.         server="ftp.drugfacts.com"
  28.         port="21"
  29.         userid="321489"
  30.         password="H2H+soLu"
  31.             remotedir="/Medispan/321489">
  32.         <fileset dir="Drug_Download_Files">
  33.             <include name="DIB*${TODAY_US}*.zip"/>
  34.             </fileset>
  35.             </ftp>
  36.    
  37.    
  38.  </target>
  39.    
  40.     <target name="unzip">
  41.        
  42.         <unzip dest="./unzipped">
  43.             <fileset dir=".">
  44.                 <include name="**/*.zip"/>
  45.             </fileset>
  46.         </unzip>
  47.  
  48.         </target>
  49.    
  50.     <target name = "createdir">
  51.    
  52.     <mkdir dir="files"/>
  53.     <mkdir dir="files/data"/>
  54.     <mkdir dir="files/scripts"/>   
  55.         </target>
  56.    
  57.  
  58.    <target name="copyfiles">
  59.    
  60.     <copy todir="files/data">
  61.       <fileset dir="unzipped"
  62.                includes="mmw*"
  63.                
  64.       />
  65.     </copy>
  66.    
  67.     <copy todir="files/scripts">
  68.           <fileset dir="unzipped"
  69.                    includes="mysql_load*"
  70.                    
  71.           />
  72.         </copy>
  73.     </target>
  74.    
  75.    
  76.     <target name="truncate_and_copy">
  77.     <truncate_tables  uname="sanjeev" pwd="sanjeev" url="jdbc:mysql://10.0.0.162:3306/test" db_from="test1"/>
  78.  
  79.     </target>
  80.    
  81.        
  82.    
  83. </project>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top