Вы находитесь на странице: 1из 2

<project name="HelloWorld" basedir=".

" default="main">
<property name="lib.dir"
value="lib"/>
<property name="Resources.dir"
value="Resources"/>
<property
<property
<property
<property

name="src.dir"
name="build.dir"
name="classes.dir"
name="jar.dir"

value="src"/>
value="build"/>
value="${build.dir}/classes"/>
value="${build.dir}/jar"/>

<property name="main-class" value="com.nagarro.flightsearch.FlightSearchDri


ver"/>
<property name="dist.dir" location="dist" />
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
<fileset dir="${Resources.dir}" includes="**/*.csv"/>
</path>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="compile">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classp
ath"/>
</target>
<mkdir dir="${dist.dir}" />
<jar jarfile="${dist}/lib/CC-${DSTAMP}.jar" basedir="${classes.dir}"/>
<manifestclasspath property="mf.classpath" jarfile="${dist}/lib/CC.jar">
<classpath>
<fileset dir="${lib.dir}/" includes="**/*.jar"/>
<fileset dir="${Resources.dir}/" includes="**/*.csv"/>
</classpath>
</manifestclasspath>
<target name="jar" depends="compile">
<mkdir dir="${jar.dir}"/>
<jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.di
r}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
<attribute name="Class-Path" value="${mf.classpath}"/>
</manifest>
</jar>
</target>

<target name="clean-build" depends="clean,jar"/>


<target name="main" depends="clean,run"/>

</project>