Description: Added ANT build system
 The sources of the fits package are shipped in a
 jar archive which does not contain any build system.
 In order to provide checks on the source code,
 we have added a build system based on ANT.
 This system will also be used to build the Debian
 package of the fits library.
Origin: http://heasarc.gsfc.nasa.gov/docs/heasarc/fits/java/
Author: Florian Rothmaier <frothmai@ari.uni-heidelberg.de>
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,182 @@
+<?xml version="1.0"?>
+
+<!--
+ !   FITS build file
+ !
+ !   This file describes how to build the FITS package
+ !   from a source release. It requires Apache ANT and a Java
+ !   Development Kit.
+ !
+ !   The main targets are:
+ !
+ !      build            -> compiles the source code
+ !      clean            -> cleans up build and dist products
+ !      jar              -> creates the package jar file
+ !      javadoc          -> creates the API documentation
+ !
+ !   Author:
+ !      Florian Rothmaier (created: 2012-11-13, updated: 2016-11-17)
+ !
+ !-->
+
+<project name="Build file for FITS" default="build" basedir=".">
+
+	<!--
+	!  ==========
+	!  Properties
+	!  ==========
+	!-->
+
+	<!-- Define the package name and current versions -->
+	<property name="Name" value="FITS"/>
+	<property name="name" value="fits"/>
+	<property name="version" value="1.0.8"/>
+
+	<!-- The Java package name -->
+	<property name="package.name" value="fits"/>
+
+	<!-- Directory containing the java source (top of the namespace)-->
+	<property name="java.dir" value="${basedir}"/>
+
+	<!-- Directories to receive the various build components -->
+	<property name="classes.dir" value="${java.dir}/classes"/>
+
+	<!-- Distribution directories, these are created in the current
+	!   directory, unless dist.dir is redefined. Files that will be
+	!   installed under a package name prefixed directory should be
+	!   placed in the ".pkg" variants. Note some build components may
+	!   be placed directly here for efficiency-->
+	<property name="lib.dir" value="${basedir}/lib"/>
+	<property name="docs.dir" value="${basedir}/docs"/>
+
+	<!-- Compilation options -->
+	<property name="debug" value="true"/>
+	<property name="deprecation" value="false"/>
+	<property name="optimize" value="true"/>
+
+	<!-- URL and package-list for linking against full Java docs -->
+	<property name="javaapi.url" value="http://docs.oracle.com/javase/1.5.0/docs/api/"/>
+
+
+	<!--
+	!   ==============
+	!   Build the code
+	!   ==============
+	!
+	!  The results of the compilation are placed in the build.classes
+	!  directory. Other files that are also needed in the classes tree
+	!  (i.e. resources like images) should also be copied into place here.
+	!-->
+	<target name="build"
+			description="-> compiles the source code">
+
+		<mkdir dir="${classes.dir}"/>
+		<javac srcdir="${java.dir}"
+				includes="**/*.java"
+				excludes="**/test/**/*.java"
+				destdir="${classes.dir}"
+				includeantruntime="false"
+				debug="${debug}"
+				deprecation="${deprecation}"
+				optimize="${optimize}"
+				encoding="utf-8">
+
+			<classpath>
+				<fileset dir="/usr/share/java">
+					<include name="commons-compress.jar"/>
+					<include name="findbugs.jar"/>
+				</fileset>
+			</classpath>
+
+		</javac>
+
+	</target>
+
+
+	<!--
+	!   ============================================
+	!   Cleans up build and distribution directories
+	!   ============================================
+	!-->
+	<target name="clean"
+			description="-> cleans up build and dist products">
+
+		<delete dir="${classes.dir}"/>
+		<delete dir="${lib.dir}"/>
+		<delete dir="${docs.dir}"/>
+
+	</target>
+
+
+	<!--
+	!   ============================
+	!   Create the package jar files
+	!   ============================
+	!
+	!  Creates a jar file from the build.classes directory tree. If
+	!  jars of sub-components are also required these should be also
+	!  created here. Note this requires a manifest file that defines the
+	!  jars that we directly depend on (using relative URLs) on and, if
+	!  appropriate, defines the application entrance point. The jar
+	!  files should be placed directly in the distribution directories.
+	!-->
+	<target name="jar"
+			depends="build"
+			description="-> creates the package jar file">
+
+		<mkdir dir="${lib.dir}"/>
+		<jar destfile="${lib.dir}/${name}.jar"
+			basedir="${classes.dir}">
+                        <manifest>
+			        <attribute name="Class-Path" value="/usr/share/java/commons-compress.jar /usr/share/findbugs.jar"/>
+			</manifest>
+		</jar>
+
+	</target>
+
+
+	<!--
+	!   =============================
+	!   Creates the API documentation
+	!   =============================
+	!
+	!  The documentation is created from the Java sources. Should also
+	!  extend this to include the possibility of other miscellaneous
+	!  documentation (FAQs etc.).
+	!-->
+	<target name="javadoc"
+			description="-> creates the API documentation">
+
+		<mkdir dir="${docs.dir}"/>
+		<javadoc useexternalfile="yes"
+				destdir="${docs.dir}"
+				author="true"
+				version="true"
+				locale="en"
+				windowtitle="${Name} API"
+				doctitle="${Name}">
+
+			<!-- Get a list of directories that name all the potential
+			!   java packages -->
+			<fileset dir="${java.dir}" defaultexcludes="yes"
+					includes="**/*.java"
+					excludes="**/test/**/*.java,**/*.class"/>
+
+			<classpath>
+				<fileset dir="/usr/share/java">
+					<include name="commons-compress.jar"/>
+					<include name="findbugs.jar"/>
+				</fileset>
+			</classpath>
+
+			<!-- Link to the full Java API at SUNs website -->
+			<link offline="true" href="${javaapi.url}"
+					packagelistLoc="${docs.dir}"/>
+
+			<group title="${Name} API" packages="${package.name}*"/>
+		</javadoc>
+
+	</target>
+
+
+</project>
