forked from fbacchella/RRD4J
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
147 lines (136 loc) · 5.9 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
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
<project name="rrd4j" default="rrd4j" basedir=".">
<description>RRD4J Build File</description>
<property file="build.properties" />
<!-- VARIABLES -->
<property name="version" value="${buildVersion}"/>
<property name="who" value="Mathias Bogaert <[email protected]>"/>
<property name="classes" value="classes"/>
<property name="doc" value="doc"/>
<property name="javadoc" value="${doc}/javadoc"/>
<property name="src" value="src/main/java"/>
<property name="resources" value="src/main/resources"/>
<property name="lib" value="lib"/>
<property name="dist" value="dist"/>
<property name="tmpfile" value="tmp.tar"/>
<property name="lib-rrd4j" value="rrd4j-${version}.jar"/>
<property name="lib-inspector" value="inspector-${version}.jar"/>
<property name="lib-converter" value="converter-${version}.jar"/>
<property name="lib-demo" value="demo-${version}.jar"/>
<property name="dist-prefix" value="rrd4j-${version}"/>
<property name="dist-file" value="${dist-prefix}.tar.gz"/>
<path id="class.path">
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- TARGETS -->
<target name="init">
<tstamp/>
<mkdir dir="${classes}"/>
<mkdir dir="${javadoc}"/>
<mkdir dir="${lib}"/>
<mkdir dir="${dist}"/>
</target>
<target name="clean">
<delete dir="${classes}"/>
<delete dir="${doc}"/>
<delete dir="${dist}"/>
</target>
<target name="compile" depends="init">
<javac srcdir="${src}"
destdir="${classes}"
classpathref="class.path"
compiler="modern"
encoding="${buildSourceEncoding}"
source="${buildSource}"
target="${buildTarget}"/>
<copy todir="${classes}">
<fileset dir="${resources}"/>
</copy>
</target>
<target name="rrd4j" depends="compile">
<jar jarfile="${dist}/${lib-rrd4j}" basedir="${classes}">
<manifest>
<attribute name="Main-Class" value="org.rrd4j.cmd.RrdCommander"/>
</manifest>
<include name="org/rrd4j/*.class"/>
<include name="org/rrd4j/cmd/**/*.class"/>
<include name="org/rrd4j/converter/**/*.class"/>
<include name="org/rrd4j/core/**/*.class"/>
<include name="org/rrd4j/data/**/*.class"/>
<exclude name="org/rrd4j/demo/**/*.class"/>
<include name="org/rrd4j/graph/**/*.class"/>
<include name="org/rrd4j/inspector/**/*.class"/>
<include name="*.ttf"/>
<include name="*.gif"/>
<include name="*.png"/>
</jar>
<jar jarfile="${dist}/${lib-converter}" basedir="${classes}">
<manifest>
<attribute name="Main-Class" value="org.rrd4j.converter.Convertor"/>
<attribute name="Class-Path" value="${lib-rrd4j}"/>
</manifest>
<include name="org/rrd4j/converter/**/*.class"/>
</jar>
<jar jarfile="${dist}/${lib-inspector}" basedir="${classes}">
<manifest>
<attribute name="Main-Class" value="org.rrd4j.inspector.RrdInspector"/>
<attribute name="Class-Path" value="${lib-rrd4j}"/>
</manifest>
<include name="org/rrd4j/inspector/**/*.class"/>
<include name="*.gif"/>
<include name="*.png"/>
</jar>
<jar jarfile="${dist}/${lib-demo}" basedir="${classes}">
<manifest>
<attribute name="Main-Class" value="org.rrd4j.demo.Demo"/>
<attribute name="Class-Path" value="${lib-rrd4j}"/>
</manifest>
<include name="org/rrd4j/demo/**/*.class"/>
</jar>
</target>
<target name="javadoc" depends="compile">
<javadoc author="false" version="false"
destdir="${javadoc}"
packagenames="org.rrd4j.cmd.*,org.rrd4j.converter.*,org.rrd4j.core.*,org.rrd4j.data.*,org.rrd4j.demo.*,org.rrd4j.graph.*,org.rrd4j.inspector.*,org.rrd4j.*"
excludepackagenames="org.rrd4j.core.jrrd.*"
encoding="${buildSourceEncoding}"
source="${buildSource}"
sourcepath="${src}"
access="protected">
<classpath refid="class.path"/>
<link href="http://docs.oracle.com/javase/6/docs/api/" />
<link href="http://api.mongodb.org/java/current/" />
<link href="http://docs.oracle.com/cd/E17277_02/html/java/" />
<link href="http://junit.sourceforge.net/javadoc/" />
<link href="http://api.mongodb.org/java/current" />
</javadoc>
</target>
<target name="dist" depends="init,rrd4j,javadoc">
<tar destfile="${dist}/${tmpfile}">
<tarfileset dir="${doc}" prefix="${dist-prefix}/${doc}">
<include name="**/*"/>
</tarfileset>
<tarfileset dir="${lib}" prefix="${dist-prefix}/${lib}">
<include name="**/*.jar"/>
</tarfileset>
<tarfileset dir="${dist}" prefix="${dist-prefix}/${lib}">
<include name="**/*.jar"/>
</tarfileset>
<tarfileset dir="${src}" prefix="${dist-prefix}/${src}">
<include name="**/*.java"/>
</tarfileset>
<tarfileset dir="${resources}" prefix="${dist-prefix}/${resources}">
<include name="**/*"/>
</tarfileset>
<tarfileset dir="${classes}" prefix="${dist-prefix}/${classes}">
<include name="**/*.class"/>
</tarfileset>
<tarfileset dir="${basedir}" prefix="${dist-prefix}">
<include name="**/*.txt"/>
</tarfileset>
</tar>
<gzip src="${dist}/${tmpfile}" zipfile="${dist}/${dist-file}"/>
<delete file="${dist}/${tmpfile}"/>
</target>
</project>