<?xml version="1.0" encoding="UTF-8"?>
<project name="ads_build" basedir="/data/jenkins/jobs/ads_api/workspace/" default="build_app">
<property name=‘base.dir‘ value=‘.‘></property>
<property name="ads.dir" value="${base.dir}/ads-api"></property>
<property name="core.dir" value="${base.dir}/ads-core"></property>
<property name="target.dir" value="."></property>
<path id="compile.classpath">
<fileset dir="${target.dir}/lib">
<include name="*.jar" />
</fileset>
</path>
<target name="genDirs">
<mkdir dir="${target.dir}/dist" />
<mkdir dir="${target.dir}/src" />
<mkdir dir="${target.dir}/lib" />
<mkdir dir="${target.dir}/dist/WEB-INF/classes" />
</target>
<target name="copyFiles" depends="genDirs">
<delete includeemptydirs="true">
<fileset dir="${ads.dir}/html/WEB-INF/classes/">
</fileset>
</delete>
<copy todir="${target.dir}/src">
<fileset dir="${core.dir}/src">
</fileset>
</copy>
<copy todir="${target.dir}/src">
<fileset dir="${ads.dir}/src">
</fileset>
</copy>
<copy todir="${target.dir}/lib">
<fileset dir="${ads.dir}/html/WEB-INF/lib">
</fileset>
</copy>
<copy todir="${target.dir}/lib">
<fileset dir="${core.dir}/lib">
</fileset>
</copy>
</target>
<target name="compile" depends="copyFiles">
<javac srcdir="${target.dir}/src" destdir="${target.dir}/src" source="1.6" encoding="utf-8">
<classpath refid="compile.classpath">
</classpath>
</javac>
</target>
<target name="build_app" depends="compile">
<copy todir="${target.dir}/dist">
<fileset dir="${ads.dir}/html">
</fileset>
</copy>
<copy todir="${target.dir}/dist/WEB-INF/lib">
<fileset dir="${target.dir}/lib">
</fileset>
</copy>
<copy todir="${target.dir}/dist/WEB-INF/classes">
<fileset dir="${target.dir}/src" excludes="**/*.java">
</fileset>
</copy>
<copy todir="${target.dir}/dist/WEB-INF/classes">
<fileset dir="${ads.dir}/config" >
</fileset>
</copy>
<delete includeemptydirs="true">
<fileset dir="${target.dir}/src">
</fileset>
</delete>
<delete includeemptydirs="true">
<fileset dir="${target.dir}/lib">
</fileset>
</delete>
</target>
</project>