-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
executable file
·115 lines (97 loc) · 3.98 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
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="eavdam" default="compile">
<property name="version" value="1.6" />
<property name="libdir" value="${basedir}/lib" />
<property name="sharedir" value="${basedir}/share" />
<property name="distdir" value="${basedir}/dist" />
<property name="build.dir" value="${basedir}/build" />
<property name="build.classes.dir" value="${build.dir}/classes" />
<property name="build.final.name" value="${ant.project.name}.jar" />
<property name="javadoc.dir" value="${basedir}/javadoc" />
<property name="src.dir" value="${basedir}/src" />
<property name="src.main.dir" value="${src.dir}/main" />
<property name="src.main.java.dir" value="${src.main.dir}/java" />
<path id="compile.class.path">
<fileset dir="${libdir}">
<include name="**/*.jar" />
</fileset>
</path>
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${javadoc.dir}" />
</target>
<target name="distclean" depends="clean">
<delete dir="${distdir}" />
</target>
<target name="init">
<mkdir dir="${build.classes.dir}" />
</target>
<target name="compile" depends="init">
<replace file="${src.main.java.dir}/dk/frv/eavdam/menus/AboutEAVDAMMenuItem.java" token="xx.xx" value="${version}"/>
<javac destdir="${build.classes.dir}" debug="on" encoding="UTF-8" includeantruntime="false">
<compilerarg value="-Xlint:all,-path" />
<includesfile />
<classpath refid="compile.class.path" />
<src path="${src.main.java.dir}" />
</javac>
<replace file="${src.main.java.dir}/dk/frv/eavdam/menus/AboutEAVDAMMenuItem.java" token="${version}" value="xx.xx"/>
</target>
<target name="jar" depends="compile">
<jar file="${build.dir}/${build.final.name}">
<fileset dir="${build.classes.dir}" />
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Main-Class" value="com.bbn.openmap.app.OpenMap" />
<attribute name="Class-Path" value=". lib/*"/>
<section name="dk/frv/eavdam/">
<attribute name="Specification-Title" value="EfficienSea AIS VHF Datalink Manager" />
<attribute name="Specification-Version" value="${version}" />
<attribute name="Specification-Vendor" value="Danish Maratime Safety Administration" />
<attribute name="Package-Title" value="dk.frv.eavdam" />
<attribute name="Package-Version" value="${version}" />
<attribute name="Package-Vendor" value="dk.frv.eavdam" />
<attribute name="Package-Vendor-Id" value="DaMSA" />
<attribute name="Implementation-Version" value="${version}"/>
</section>
</manifest>
</jar>
</target>
<target name="dist" depends="jar">
<mkdir dir="${distdir}" />
<mkdir dir="${distdir}/lib" />
<mkdir dir="${distdir}/share" />
<copy file="${build.dir}/${build.final.name}" todir="${distdir}/lib" overwrite="true"/>
<copy todir="${distdir}/lib">
<fileset dir="${libdir}">
<include name="*.jar" />
</fileset>
</copy>
<copy todir="${distdir}/share">
<fileset dir="${sharedir}" />
</copy>
<copy file="${basedir}/openmap.properties" todir="${distdir}" overwrite="false"/>
<copy file="${basedir}/LICENSE.txt" todir="${distdir}" overwrite="false"/>
</target>
<target name="run" depends="dist">
<java classname="com.bbn.openmap.app.OpenMap" fork="true" dir="${distdir}" maxmemory="1024m">
<sysproperty key="java.library.path" value="navicon/native/" />
<jvmarg value="-Xmx1024M"/>
<jvmarg value="-Xms1024M"/>
<jvmarg value="-Xmn256M"/>
<classpath>
<pathelement location="${distdir}"/>
<pathelement location="${distdir}/share"/>
<fileset dir="${distdir}/lib">
<include name="**/*.jar" />
</fileset>
</classpath>
</java>
</target>
<target name="javadoc">
<mkdir dir="${javadoc.dir}" />
<javadoc sourcepath="${src.main.java.dir}" destdir="${javadoc.dir}" classpathref="compile.class.path">
<doctitle><![CDATA[<h1>DaMSA EAVDAM</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 2011 Danish Maritime Safety Administration</i>]]></bottom>
</javadoc>
</target>
</project>