forked from claeis/ili2db
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-ili2gpkg.xml
177 lines (160 loc) · 7.51 KB
/
build-ili2gpkg.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
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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="jar" name="ili2gpkg">
<!-- set global properties for this build -->
<property name="src" value="${basedir}/src"/>
<property name="build" value="${basedir}/build"/>
<property name="dist" value="${basedir}/dist"/>
<property name="lib" value="libs"/>
<property name="sqlite" value="sqlite-jdbc-3.8.11.2.jar"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<property name="projectjar" value="${build}/jar/${ant.project.name}.jar"/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${build}/jar"/>
<mkdir dir="${dist}"/>
</target>
<target depends="init" name="compile">
<!-- Compile the java code from ${src} into ${build}/classes -->
<mkdir dir="${build}/classes"/>
<javac destdir="${build}/classes" includes="**/*.java" excludes="**/test/*.java" source="1.6" target="1.6">
<classpath>
<pathelement location="${lib}/antlr.jar"/>
<pathelement location="${lib}/ehibasics.jar"/>
<pathelement location="${lib}/ili2c-core.jar"/>
<pathelement location="${lib}/ili2c-tool.jar"/>
<pathelement location="${lib}/iox-api.jar"/>
<pathelement location="${lib}/iox-ili.jar"/>
<pathelement location="${lib}/jts-core-1.14.0.jar"/>
<pathelement location="${lib}/gson-2.6.2.jar"/>
<pathelement location="${lib}/toml4j-0.5.1.jar"/>
<pathelement location="${lib}/ehisqlgen.jar"/>
<pathelement location="${lib}/${sqlite}"/>
</classpath>
<src path="${src}" />
<src path="ili2gpkg/src"/>
</javac>
</target>
<target depends="init" name="javadocs">
<mkdir dir="${build}/javadoc/api"/>
<javadoc Public="true" Windowtitle="${ant.project.name}" destdir="${build}/javadoc/api">
<sourcepath path="${src}"/>
</javadoc>
</target>
<target depends="init,compile" name="jar">
<propertyfile file="ili2gpkg/src/ch/ehi/ili2gpkg/Version.properties">
<!-- <entry key="versionMicro" type="int" value="1" operation="+"/> -->
<entry key="versionDate" type="date" value="now" pattern="yyyyMMdd"/>
</propertyfile>
<delete file="${projectjar}" quiet="true"/>
<jar jarfile="${projectjar}">
<manifest>
<!-- attribute name="Built-By" value="${user.name}"/>
<attribute name="Build-Jdk" value="${java.version}"/>
<attribute name="ArtefactId" value="GBDBS"/>
<attribute name="Buildnumber" value=""/>
<attribute name="Description" value="${mf.description}"/>
<attribute name="GroupId" value="${mf.groupid}"/>
<attribute name="Organisazion" value="${mf.organization}"/>
<attribute name="Url" value="${mf.url}"/>
<attribute name="Version" value="${version}"/-->
<attribute name="Main-Class" value="ch.ehi.ili2gpkg.GpkgMain"/>
<attribute name="Class-Path" value="${lib}/antlr.jar ${lib}/ehibasics.jar ${lib}/gson-2.6.2.jar ${lib}/ili2c-core.jar ${lib}/ili2c-tool.jar ${lib}/iox-api.jar ${lib}/iox-ili.jar ${lib}/jts-core-1.14.0.jar ${lib}/toml4j-0.5.1.jar ${lib}/ehisqlgen.jar ${lib}/${sqlite}"/>
</manifest>
<fileset dir="${build}/classes" includes="**/*.class"/>
<fileset dir="${src}" includes="**/*.properties"/>
<fileset dir="ili2gpkg/src" includes="**/*.sql"/>
<fileset dir="ili2gpkg/src" includes="**/*.properties"/>
<!-- <fileset dir="resources/de" includes="**/*.properties"/>
<fileset dir="resources/fr" includes="**/*.properties"/>
<fileset dir="resources/it" includes="**/*.properties"/> -->
<fileset dir="${src}" includes="**/*.gif"/>
<fileset dir="${src}" includes="**/*.jpg"/>
<fileset dir="${src}" includes="**/*.png"/>
</jar>
</target>
<target depends="init,compile" name="fatjar">
<property file="ili2gpkg/src/ch/ehi/ili2gpkg/Version.properties" prefix="buildnr."/>
<property name="buildnr" value="${buildnr.versionMajor}.${buildnr.versionMinor}.${buildnr.versionMicro}"/>
<delete file="${build}/jar/${ant.project.name}-${buildnr}.jar" quiet="true"/>
<jar jarfile="${build}/jar/${ant.project.name}-${buildnr}.jar" basedir="${build}/classes">
<manifest>
<attribute name="Main-Class" value="ch.ehi.ili2gpkg.GpkgMain"/>
</manifest>
<zipgroupfileset dir="libs">
<include name ="antlr.jar"/>
<include name ="ehibasics.jar"/>
<include name ="gson-2.6.2.jar"/>
<include name ="ili2c-core.jar"/>
<include name ="ili2c-tool.jar"/>
<include name ="iox-api.jar"/>
<include name ="iox-ili.jar"/>
<include name ="jts-core-1.14.0.jar"/>
<include name ="toml4j-0.5.1.jar"/>
<include name ="ehisqlgen.jar"/>
<include name ="${sqlite}"/>
</zipgroupfileset>
<fileset dir="${src}" includes="**/*.properties"/>
<fileset dir="ili2gpkg/src" includes="**/*.sql"/>
<fileset dir="ili2gpkg/src" includes="**/*.properties"/>
</jar>
</target>
<target depends="init" name="buildnr">
<property file="ili2gpkg/src/ch/ehi/ili2gpkg/Version.properties" prefix="buildnr."/>
<property name="buildnr" value="${buildnr.versionMajor}.${buildnr.versionMinor}.${buildnr.versionMicro}"/>
<!-- <property name="buildnr" value="${DSTAMP}"/> -->
</target>
<target depends="init,buildnr" name="bindist">
<delete file="${dist}/${ant.project.name}-${buildnr}.zip" quiet="true"/>
<zip zipfile="${dist}/${ant.project.name}-${buildnr}.zip">
<zipfileset dir="${build}/jar" prefix="${ant.project.name}-${buildnr}">
<patternset includes="${ant.project.name}.jar"/>
</zipfileset>
<zipfileset dir="${basedir}" prefix="${ant.project.name}-${buildnr}">
<patternset includes="${lib}/antlr.jar"/>
<patternset includes="${lib}/ehibasics.jar"/>
<patternset includes="${lib}/gson-2.6.2.jar"/>
<patternset includes="${lib}/ili2c-core.jar"/>
<patternset includes="${lib}/ili2c-tool.jar"/>
<patternset includes="${lib}/iox-api.jar"/>
<patternset includes="${lib}/iox-ili.jar"/>
<patternset includes="${lib}/jts-core-1.14.0.jar"/>
<patternset includes="${lib}/toml4j-0.5.1.jar"/>
<patternset includes="${lib}/ehisqlgen.jar"/>
<patternset includes="${lib}/${sqlite}"/>
</zipfileset>
<zipfileset dir="." prefix="${ant.project.name}-${buildnr}">
<patternset includes="docs/ili2db.html"/>
</zipfileset>
</zip>
</target>
<target depends="init,buildnr" name="srcdist">
<delete file="${dist}/${ant.project.name}-${buildnr}.src.zip" quiet="true"/>
<zip zipfile="${dist}/${ant.project.name}-${buildnr}.src.zip">
<zipfileset dir="." prefix="${ant.project.name}-${buildnr}">
<patternset includes="build-ili2gpkg.xml"/>
<patternset includes="sample/zpl/**"/>
<patternset includes="src/**" excludes="**/CVS/*;**/bak~/*"/>
<patternset includes="ili2gpkg/src/**" excludes="**/CVS/*;**/bak~/*"/>
<patternset includes="resources/de/**/*.properties"/>
<patternset includes="resources/fr/**/*.properties"/>
<patternset includes="resources/it/**/*.properties"/>
<patternset includes="${lib}/antlr.jar"/>
<patternset includes="${lib}/ehibasics.jar"/>
<patternset includes="${lib}/gson-2.6.2.jar"/>
<patternset includes="${lib}/ili2c-core.jar"/>
<patternset includes="${lib}/ili2c-tool.jar"/>
<patternset includes="${lib}/iox-api.jar"/>
<patternset includes="${lib}/iox-ili.jar"/>
<patternset includes="${lib}/jts-core-1.14.0.jar"/>
<patternset includes="${lib}/toml4j-0.5.1.jar"/>
<patternset includes="${lib}/ehisqlgen.jar"/>
<patternset includes="${lib}/${sqlite}"/>
</zipfileset>
</zip>
</target>
<target name="clean">
<delete dir="${build}"/>
</target>
</project>