1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!-- Ametros Dive Computer
3 Copyright (C) 2010 Geoff Johnstone
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see http://www.gnu.org/licenses/.
18 <project name="Dive Tables" default="dist">
20 <path id="AntClassPath">
21 <fileset dir="ant" includes="*.jar" />
26 classname="com.sun.tools.xjc.XJCTask"
27 classpathref="AntClassPath" />
31 <fileset dir="lib" includes="*.jar" />
35 <property name="JAR" value="dive.jar" />
36 <property name="Main-Class" value="net.ametros.dive.Main" />
39 <target name="autogen">
41 <xjc schema="xsd/dives.xsd"
43 package="net.ametros.dive.data">
44 <produces dir="gensrc/net/ametros/dive/data" includes="*.java" />
49 <target name="compile" depends="autogen">
50 <mkdir dir="classes" />
52 <javac destdir="classes"
53 classpathref="ClassPath"
54 includeantruntime="false"
56 <compilerarg value="-Xlint:deprecation" />
57 <compilerarg value="-Xlint:unchecked" />
64 <target name="jar" depends="compile">
65 <manifestclasspath property="jar.classpath" jarfile="lib/dummy.jar">
66 <classpath refid="ClassPath" />
68 <jar destfile="${JAR}">
70 <attribute name="Main-Class" value="${Main-Class}" />
71 <attribute name="Class-Path" value="${jar.classpath}" />
73 <fileset dir="classes" includes="**/*" />
74 <fileset dir="xsd" includes="*.xsd" />
75 <fileset dir="templates" includes="**/*" />
80 <target name="dist" depends="jar">
83 <fileset file="${JAR}" />
84 <fileset dir="lib" includes="*.jar" />
89 <target name="javadoc" depends="autogen">
90 <delete dir="javadoc" />
91 <javadoc destdir="javadoc"
93 classpathref="ClassPath"
94 doctitle="Ametros Dive Computer"
95 windowtitle="Ametros Dive Computer">
96 <fileset dir="src" includes="**/*.java" />
97 <fileset dir="gensrc" includes="**/*.java" />
103 <delete file="dive.tar.gz" />
104 <exec executable="git" failonerror="true">
105 <arg value="archive" />
106 <arg value="--format=tar" />
107 <arg value="--prefix=dive/" />
109 <arg value="dive.tar" />
110 <arg value="master" />
112 <exec executable="gzip" failonerror="true">
114 <arg value="dive.tar" />
119 <target name="clean">
120 <delete dir="gensrc" />
121 <delete dir="classes" />
122 <delete dir="dist" />
123 <delete dir="javadoc" />
124 <delete file="${JAR}" />
125 <delete file="dive.tar" />
126 <delete file="dive.tar.gz" />