File: build.xml

package info (click to toggle)
libfits-java 1.15.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 6,508 kB
  • ctags: 5,935
  • sloc: java: 37,755; ansic: 9,962; xml: 2,489; makefile: 8
file content (182 lines) | stat: -rw-r--r-- 5,122 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
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>