Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <project name="ant-project" default="build">
- <description>
- Ant task to download drug info from Medispan
- </description>
- <taskdef resource="net/sf/antcontrib/antcontrib.properties" />
- <taskdef name="truncate_tables" classname="db_transfer.truncate" classpath="C:\\app\\workspace\\drxworkspace\\Ant_Drug_Download\\bin\\db_transfer"/>
- <tstamp>
- <format property="TODAY_US" pattern="yyyyMM" locale="en,US"/>
- </tstamp>
- <!-- =================================
- target: build
- ================================= -->
- <target name="build">
- <ftp action ="get"
- server="ftp.drugfacts.com"
- port="21"
- userid="321489"
- password="H2H+soLu"
- remotedir="/Medispan/321489">
- <fileset dir="Drug_Download_Files">
- <include name="DIB*${TODAY_US}*.zip"/>
- </fileset>
- </ftp>
- </target>
- <target name="unzip">
- <unzip dest="./unzipped">
- <fileset dir=".">
- <include name="**/*.zip"/>
- </fileset>
- </unzip>
- </target>
- <target name = "createdir">
- <mkdir dir="files"/>
- <mkdir dir="files/data"/>
- <mkdir dir="files/scripts"/>
- </target>
- <target name="copyfiles">
- <copy todir="files/data">
- <fileset dir="unzipped"
- includes="mmw*"
- />
- </copy>
- <copy todir="files/scripts">
- <fileset dir="unzipped"
- includes="mysql_load*"
- />
- </copy>
- </target>
- <target name="truncate_and_copy">
- <truncate_tables uname="sanjeev" pwd="sanjeev" url="jdbc:mysql://10.0.0.162:3306/test" db_from="test1"/>
- </target>
- </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement