-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
90 lines (78 loc) · 2.93 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
<?xml version="1.0"?>
<!-- DOCTYPE date SYSTEM "ant.dtd" -->
<project name="kafka-watcher" default="compile" basedir=".">
<import file="../hkAntLib/javac.xml"/>
<import file="../hkAntLib/package.xml"/>
<import file="../hkAntLib/cobertura.xml"/>
<import file="../hkAntLib/junit.xml"/>
<!-- use the following instead of the above if needed
<import>
<url url="https://raw.githubusercontent.com/HaraldKi/hkAntLib/master/javac.xml"/>
</import>
<import>
<url url="https://raw.githubusercontent.com/HaraldKi/hkAntLib/master/package.xml"/>
</import>
-->
<property name="project.java.version" value="1.8"/>
<target name="compile" depends="ivy">
<do-javac/>
</target>
<target name="ivyinfo" xmlns:ivy="antlib:org.apache.ivy.ant">
<ivy:info/>
</target>
<target name="jar" depends="compile">
<do-dist-jar/>
</target>
<target name="versionfile" depends="ivyinfo">
<mkdir dir="build/tmp"/>
<delete>
<fileset dir="build/tmp" includes="version*"/>
</delete>
<tstamp>
<format property="tstamp" pattern="yyyy-MM-dd_HH:mm:ss Z"/>
</tstamp>
<echo file="build/tmp/version-${ivy.revision}.txt"
message="packaged on ${tstamp}${line.separator}"/>
</target>
<target name="distzip" depends="jar, versionfile, ivyinfo">
<property name="d" value="kafka-watcher-${ivy.revision}"/>
<zip destfile="build/sitecontent/download/${d}.zip">
<zipfileset dir="build/tmp" includes="version*txt"
prefix="${d}"/>
<zipfileset dir="build/sitecontent/download/"
includes="kafka-watcher-${ivy.revision}.jar"
prefix="${d}/libs"/>
<zipfileset dir="libs" includes="**/*.jar" prefix="${d}/libs"/>
<zipfileset dir="src/conf" includes="*.properties" prefix="${d}/libs"/>
<zipfileset dir="." includes="static/**" prefix="${d}"/>
<zipfileset dir="src/scripts" includes="kafka-watcher" filemode="775"
prefix="${d}"/>
<zipfileset dir="src/scripts" includes="kafka-watcher.bat" prefix="${d}"/>
</zip>
</target>
<target name="package" depends="jar, distzip"/>
<target name="compile-tests" depends="compile">
<do-javac-tests/>
</target>
<target name="test-coverage" depends="compile, compile-tests">
<do-define-cobertura/>
<do-cobertura-instrument/>
<do-junit/>
<do-cobertura-report/>
</target>
<target name="start" depends="compile">
<java classname="de.pifpafpuf.kawa.KafkaWatcherServer" fork="true">
<classpath>
<pathelement location="libs/*"/>
<pathelement location="libs/Jetty/*" />
<pathelement location="build/classes"/>
<pathelement location="src/conf"/>
</classpath>
</java>
</target>
<target name="ivy" xmlns:ivy="antlib:org.apache.ivy.ant">
<ivy:configure settingsId="ivyconf" file="./ivysettings.xml"/>
<ivy:resolve />
<ivy:retrieve pattern="libs/[artifact]-[revision].[ext]" />
</target>
</project>