-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
84 lines (84 loc) · 3.71 KB
/
build.xml
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
<?xml version="1.0"?>
<project name="jTileDownloader" default="generateAll" basedir=".">
<property file="application.properties" />
<property name="target.java.version" value="1.5" />
<property environment="env" />
<target name="generateAll" description="Generates all targets">
<antcall target="generateJavaDoc" />
<antcall target="generateSourcesZip" />
<antcall target="createJar" />
<antcall target="releaseZip" />
</target>
<target name="run" description="jTileDownloader" depends="createJar">
<antcall target="createJar" />
<java jar="${basedir}/jar/jTileDownloader-${version}.jar" fork="true" />
</target>
<target name="generateSourcesZip" description="Generates the sources zip-file" depends="generateJavaDoc">
<zip destfile="${basedir}/release/jTileDownloader-src-${version}.zip">
<zipfileset dir="." includes="COPYING.txt" prefix="jTileDownloader" />
<zipfileset dir="." includes="README.txt" prefix="jTileDownloader" />
<zipfileset dir="." includes=".classpath" prefix="jTileDownloader" />
<zipfileset dir="." includes=".project" prefix="jTileDownloader" />
<zipfileset dir="." includes="application.properties" prefix="jTileDownloader" />
<zipfileset dir="." includes="build.xml" prefix="jTileDownloader" />
<zipfileset dir="${source.dir}" prefix="jTileDownloader/${source.dir}" />
<zipfileset dir=".settings" prefix="jTileDownloader/.settings" />
<zipfileset dir="doc" prefix="jTileDownloader/doc" />
</zip>
</target>
<target name="releaseZip" description="Generates the release zip-file" depends="createJar">
<zip destfile="${basedir}/release/jTileDownloader-${version}.zip">
<zipfileset dir="." includes="COPYING.txt" prefix="jTileDownloader" />
<zipfileset dir="." includes="README.txt" prefix="jTileDownloader" />
<zipfileset dir="jar" includes="jTileDownloader-${version}.jar" prefix="jTileDownloader" />
</zip>
</target>
<target name="generateJavaDoc" description="Generate JavaDoc">
<delete dir="${basedir}/${doc.dir}" />
<mkdir dir="${basedir}/${doc.dir}" />
<javadoc
access="private"
author="true"
destdir="${doc.dir}"
doctitle="jTileDownloader API"
nodeprecated="false"
nodeprecatedlist="false"
noindex="false"
nonavbar="false"
notree="false"
packagenames="*"
source="1.6"
sourcepath="${source.dir}"
splitindex="true"
use="true"
executable="${env.JAVA_HOME}/bin/javadoc"
version="true">
<link href="http://java.sun.com/javase/6/docs/api/" />
</javadoc>
</target>
<target name="createJar" depends="compile" description="Generates the jar-file">
<jar destfile="${basedir}/jar/jTileDownloader-${version}.jar" basedir="${basedir}/bin">
<manifest>
<attribute name="Main-Class" value="${main.class}" />
<attribute name="Built-By" value="${user.name}" />
<attribute name="SplashScreen-Image" value="splash/splash.png" />
</manifest>
<fileset dir="${basedir}">
<include name="COPYING.txt" />
<include name="README" />
</fileset>
</jar>
</target>
<target name="compile" description="Compiles the source">
<delete dir="${basedir}/${bin.dir}" />
<mkdir dir="${basedir}/${bin.dir}" />
<javac destdir="${basedir}/${bin.dir}" srcdir="${basedir}/${source.dir}" debug="${build.debug}" debuglevel="${build.debuglevel}" source="${target.java.version}" target="${target.java.version}" />
<copy todir="${basedir}/${bin.dir}/org/openstreetmap/gui/jmapviewer/images">
<fileset dir="${basedir}/${source.dir}/org/openstreetmap/gui/jmapviewer/images" />
</copy>
</target>
<target name="clean" description="Remove most generated files">
<delete dir="${basedir}/${bin.dir}" />
<delete dir="${basedir}/${doc.dir}" />
</target>
</project>