forked from dotevo/OSMZmiany
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
92 lines (75 loc) · 3.05 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
<project name="OSMZmiany" default="deploy" basedir=".">
<property name="src.dir" value="${basedir}/src" />
<property name="src.jmv" value="${basedir}/src_externals/jmapviewer/src" />
<property name="src.osmo" value="${basedir}/src_externals/osmosis" />
<property name="dist.dir" value="${basedir}/dist" />
<property file="build_info.properties"/>
<property name="build.number" value="${build.major.number}.${build.minor.number}.${build.revision.number}"/>
<target name="current-number">
<echo>Current build number:${build.number}</echo>
</target>
<target name="compile">
<antcall target="revision"></antcall>
<javac srcdir="${src.dir}:${src.jmv}:${src.osmo}" destdir="bin" debug="on" optimize="on" deprecation="on" target="1.5" encoding="UTF8" includeantruntime="false">
<classpath>
<path refid="main.classpath" />
</classpath>
</javac>
</target>
<target name="dist">
<antcall target="minor"></antcall>
<antcall target="deploy"></antcall>
</target>
<target name="revision">
<propertyfile file="build_info.properties">
<entry key="build.revision.number" type="int" operation="+" value="1" pattern="0"/>
</propertyfile>
</target>
<target name="minor">
<propertyfile file="build_info.properties">
<entry key="build.minor.number" type="int" operation="+" value="1" pattern="0"/>
<entry key="build.revision.number" type="int" value="0" pattern="0"/>
</propertyfile>
</target>
<target name="major">
<propertyfile file="build_info.properties">
<entry key="build.major.number" type="int" operation="+" value="1" pattern="0"/>
<entry key="build.minor.number" type="int" value="0" pattern="0"/>
<entry key="build.revision.number" type="int" value="0" pattern="0"/>
</propertyfile>
</target>
<target name="all">
<propertyfile file="build_info.properties">
<entry key="build.major.number" type="int" operation="+" value="1" pattern="0"/>
<entry key="build.minor.number" type="int" operation="+" value="1" pattern="0"/>
<entry key="build.revision.number" type="int" operation="+" value="1" pattern="00"/>
</propertyfile>
</target>
<path id="main.classpath">
<pathelement location="${classes.dir}" />
</path>
<target name="prepare">
<mkdir dir="bin" />
<mkdir dir="${dist.dir}" />
</target>
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="bin" />
<delete dir="${dist.dir}" />
</target>
<target name="deploy" depends="compile">
<jar jarfile="${dist.dir}/${ant.project.name}-${build.number}.jar">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Main-Class" value="org.openstreetmap.OSMZmiany.OSMZmiany" />
<section name="${ant.project.name}">
<attribute name="Implementation-Title" value="OSMZmiany" />
<attribute name="Implementation-Version" value="${build.number} ${TODAY_DE}" />
</section>
</manifest>
<fileset dir="bin">
<include name="**/*.class" />
</fileset>
</jar>
</target>
</project>