#7 Buco
Tak knihovnu simple-graphics.jar uz mam vytvorenou.A ted k ukolu 2 vytvorim si dokument build.xml, ktery bude obsahovat kompilace a vygenerovani simple-graphics.jar:
<?xml version="1.8.1"?>
<project name="simple-graphics" basedir="." default="jar">
<!-- Definice cest -->
<property name="src" value="src" />
<property name="bin" value="bin" />
<property name="dist" value="dist" />
<!-- Smazani predchozich slozek -->
<target name="clean" description="Smazani predchozich slozek">
<delete dir="${bin}" />
<delete dir="${dist}" />
</target>
<!-- Vytvoreni novych slozek -->
<target name="init" description="Vytvoreni novych slozek">
<mkdir dir="${bin}" />
<mkdir dir="${dist}" />
</target>
<!-- Preklad kodu -->
<target name="compile" depends="init" description="Preklad kodu">
<javac includeantruntime="false" srcdir="${src}" destdir="${bin}" />
</target>
<!-- Vytvoreni java archivu -->
<target name="jar" depends="compile" description="Vytvoreni java archivu">
<jar jarfile="${dist}/simple-graphics.jar" basedir="${bin}" />
</target>
<!-- Spusteni celeho skriptu -->
<target name="all" depends="jar" description="Spusteni celeho skriptu" />
</project>