This repository has been archived by the owner on Aug 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 100
/
snapshot.xml
202 lines (170 loc) · 6.99 KB
/
snapshot.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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<project name="weka-snapshot" default="snapshot" basedir=".">
<!--
===========================================================================
Ant build file for creating weka snapshot distributions. Make sure that
last-release.props contains the date of the last release of this branch
of Weka (so that the changelog is correct).
Use ./weka/build.xml for tasks related to compiling weka and making the
core weka.jar executable jar file.
Type ant -projecthelp for targets and descriptions.
$Revision$
===========================================================================
-->
<!-- set global properties for this build -->
<property name="temp" value="temp"/>
<property name="weka" value="weka"/>
<property name="wekadocs" value="wekadocs"/>
<property name="wekaexamples" value="wekaexamples"/>
<property name="dist" value="dist"/>
<property name="branch" value="weka-development-3-8-distribution"/>
<!-- load the last release date -->
<property file="last-release.props"/>
<taskdef name="latex" classname="de.dokutransdata.antlatex.LaTeX"/>
<target name="init_all">
<!-- Create the time stamp and various dirs -->
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd"/>
</tstamp>
<mkdir dir="${temp}"/>
<mkdir dir="${temp}/weka"/>
<mkdir dir="${temp}/weka/lib"/>
<mkdir dir="${temp}/changelogs"/>
<mkdir dir="${temp}/data"/>
<mkdir dir="${temp}/doc"/>
<mkdir dir="${dist}"/>
<echo message="NOTE: THIS BUILD FILE IS FOR CREATING WEKA SNAPSHOT DISTRIBUTIONS. USE THE build.xml IN ./weka FOR TASKS RELATED TO COMPILING WEKA."/>
</target>
<target name="weka-exe" depends="init_all">
<echo message="Building weka.jar executable jar file..."/>
<ant antfile="build.xml" dir="${weka}" target="clean" inheritall="false"/>
<ant antfile="build.xml" dir="${weka}" target="exejar" inheritall="false"/>
</target>
<target name="remote-engine" depends="weka-exe">
<echo message="Building remote engine jar..."/>
<ant antfile="build.xml" dir="${weka}" target="remotejar" inheritall="false"/>
</target>
<target name="weka-examples" depends="weka-exe">
<echo message="Building weka examples..."/>
<ant antfile="build.xml" dir="${wekaexamples}" target="clean" inheritall="false"/>
<ant antfile="build.xml" dir="${wekaexamples}" inheritall="false">
<property name="java.class.path" value="../${weka}/build/classes"/>
</ant>
</target>
<target name="weka-src" depends="init_all">
<echo message="Building weka.jar src jar file..."/>
<ant antfile="build.xml" dir="${weka}" target="srcjar" inheritall="false"/>
</target>
<target name="javadocs" depends="weka-exe" description="Create the javadocs">
<echo message="Generating java docs for weka..."/>
<ant antfile="build.xml" dir="${weka}" target="docs" inheritall="false"/>
</target>
<!-- changelog will need -DstartDate property -->
<target name="changelog" depends="init_all" description="Create a changelog for Weka development-3-7. Creates a changelog with changes from the date in last-release-props to today">
<echo message="Creating a changelog for {${lastReleaseDate}}:{${TODAY}}"/>
<ant antfile="build.xml" dir="${weka}" target="changelog" inheritall="false">
<property name="date_range" value="{${lastReleaseDate}}:{${TODAY}}"/>
<property name="release" value="SNAPSHOT"/>
<property name="weka_branch" value="branches/stable-3-8"/>
</ant>
</target>
<target name="manual" depends="init_all" description="Make the WekaManual.">
<latex
verbose="on"
clean="on"
pdftex="off"
workingDir="${wekadocs}/manual"
>
<fileset dir="${wekadocs}/manual">
<include name="manual.tex" />
</fileset>
</latex>
<echo message="Running dvips..."/>
<exec executable="dvips" dir="${wekadocs}/manual">
<arg value="-oWekaManual.ps"/>
<arg value="manual.dvi"/>
</exec>
<echo message="Running ps2pdf..."/>
<exec executable="ps2pdf" dir="${wekadocs}/manual">
<arg value="WekaManual.ps"/>
</exec>
</target>
<target name="run_tests" depends="init_all">
<echo message="Running tests..."/>
<ant antfile="build.xml" dir="${weka}" target="run_tests_all" inheritall="false"/>
</target>
<target name="run_tests_core" depends="init_all">
<echo message="Running core tests..."/>
<ant antfile="build.xml" dir="${weka}" target="run_tests_core" inheritall="false"/>
</target>
<target name="copy-files" depends="javadocs, remote-engine, weka-src, changelog, manual">
<copy todir="${temp}/weka/lib">
<fileset dir="${weka}/lib">
<include name="**/*"/>
</fileset>
</copy>
<copy todir="${temp}/weka">
<fileset dir="${weka}/dist">
<include name="**/*"/>
</fileset>
<fileset dir="${weka}">
<include name="build.xml"/>
</fileset>
</copy>
<copy todir="${temp}/changelogs">
<fileset dir="${wekadocs}/changelogs">
<include name="**/*"/>
</fileset>
</copy>
<copy todir="${temp}/doc">
<fileset dir="${weka}/doc"/>
</copy>
<copy todir="${temp}/data">
<fileset dir="${wekadocs}/data"/>
</copy>
<copy todir="${temp}">
<fileset dir="${wekadocs}">
<include name="documentation.*"/>
<include name="README" />
<include name="COPYING" />
<include name="weka.*" />
</fileset>
</copy>
<copy todir="${temp}">
<fileset dir="${wekadocs}/manual">
<include name="WekaManual.pdf"/>
</fileset>
</copy>
<zip destfile="${temp}/wekaexamples.zip"
basedir="${wekaexamples}"/>
</target>
<target name="clean" description="Removes the dist directory">
<delete dir="${dist}"/>
</target>
<target name="snapshot_no_junit" depends="copy-files" description="Make a SNAPSHOT distribution of Weka">
<echo message="Making snapshot zip..."/>
<zip destfile="${dist}/${branch}-SNAPSHOT.zip" basedir="${temp}">
<include name="**/*"/>
</zip>
<echo message="Cleaning up..."/>
<delete dir="${temp}"/>
<ant antfile="build.xml" dir="${weka}" target="clean" inheritall="false"/>
</target>
<target name="snapshot_core_junit_only" depends="run_tests_core,copy-files" description="Make a SNAPSHOT distribution of Weka">
<echo message="Making snapshot zip..."/>
<zip destfile="${dist}/${branch}-SNAPSHOT.zip" basedir="${temp}">
<include name="**/*"/>
</zip>
<echo message="Cleaning up..."/>
<delete dir="${temp}"/>
<ant antfile="build.xml" dir="${weka}" target="clean" inheritall="false"/>
</target>
<target name="snapshot" depends="run_tests,copy-files" description="Make a SNAPSHOT distribution of Weka">
<echo message="Making snapshot zip..."/>
<zip destfile="${dist}/${branch}-SNAPSHOT.zip" basedir="${temp}">
<include name="**/*"/>
</zip>
<echo message="Cleaning up..."/>
<delete dir="${temp}"/>
<ant antfile="build.xml" dir="${weka}" target="clean" inheritall="false"/>
</target>
</project>