forked from BuggleInc/PLM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
188 lines (167 loc) · 9.88 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
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
<?xml version="1.0" encoding="UTF-8"?>
<project default="dist" name="JLM">
<!-- load ChangeLog and set property jlm.version accordingly -->
<loadfile property="jlm.version" srcFile="ChangeLog">
<filterchain>
<linecontainsregexp>
<regexp pattern="[0-9]+:"/>
</linecontainsregexp>
<headfilter lines="1"/>
<striplinebreaks/>
<striplinebreaks linebreaks=":"/>
</filterchain>
</loadfile>
<property name="base.dir" value="."/>
<property name="dist.dir" value="${base.dir}/dist"/>
<property name="lib.dir" value="${base.dir}/lib"/>
<property name="classes.dir" value="${base.dir}/bin"/>
<property name="src.dir" value="${base.dir}/src"/>
<property name="site.dir" value="${base.dir}/site"/>
<property file="${base.dir}/keystore.properties"/>
<path id="project.class.path">
<pathelement path="${classes.dir}"/>
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="clean" description="clean project">
<delete dir="${classes.dir}"/>
<delete dir="${dist.dir}"/>
<delete dir="${site.dir}/lib"/>
</target>
<target name="compile" description="compile all source files">
<mkdir dir="${classes.dir}"/>
<javac classpathref="project.class.path" destdir="${classes.dir}" srcdir="${src.dir}" />
</target>
<target name="dist" depends="compile, updateversion" description="build a standalone application jar file">
<mkdir dir="${dist.dir}"/>
<jar destfile="${dist.dir}/jlm-${jlm.version}.jar" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Built-By" value="M. Quinson and G. Oster" />
<attribute name="Main-Class" value="jlm.core.ui.JavaLearningMachine" />
<attribute name="Class-Path" value="." />
</manifest>
<fileset dir="${classes.dir}" excludes="**/.gitignore **/*.java **/*.css **/*.html"/>
<fileset dir="${src.dir}" includes="**/*.py **/*.java **/*.html **/*.css **/*.png **/*.map" excludes="**/.gitignore"/>
<fileset dir="${lib.dir}" excludes="*.jar *.pl l10n/*"/>
<!--<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/twitter4j-2.1.0-SNAPSHOT.jar" /> -->
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/twitter4j-core-2.1.4-SNAPSHOT.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/irclib.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jsyntaxpane-0.9.4.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/miglayout-3.7.2.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/simple-xml-1.7.2.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/langtools-beta.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/collections-generic-4.01.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-jai-2.0.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/vecmath-1.3.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/colt-1.2.0.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-algorithms-2.0.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/wstx-asl-3.2.6.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/concurrent-1.3.4.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-api-2.0.1.jar"/>
<!-- <zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-3d-demos-2.0.1.jar"/> -->
<!-- <zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-jai-samples-2.0.1.jar"/> -->
<!-- <zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-samples-2.0.1.jar"/> -->
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/j3d-core-1.3.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-graph-impl-2.0.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-visualization-2.0.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-3d-2.0.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-io-2.0.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/stax-api-1.0.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jython/antlr3-runtime.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jython/asm3-3.2.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jython/jruby.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jython/jython-2.5.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jython/js-1.7R3.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/httpclient-4.1.2.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/httpcore-4.1.2.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/commons-logging-1.1.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/commons-codec-1.4.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/smackx.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/smack.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/json-smart-1.1.1.jar" />
</jar>
</target>
<target name="dist-src" depends="compile, updateversion" description="build a standalone application jar file">
<mkdir dir="${dist.dir}"/>
<zip destfile="${dist.dir}/jlm-src-${jlm.version}.zip">
<fileset dir="${src.dir}" includes="**/*.java **/*.html **/*.css **/*.png **/*.map" excludes="**/.gitignore"/>
<fileset dir="${lib.dir}" excludes="*.jar *.pl"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/twitter4j-core-2.1.4-SNAPSHOT.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/irclib.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jsyntaxpane-0.9.4.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/miglayout-3.7.2.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/simple-xml-1.7.2.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/langtools-beta.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/collections-generic-4.01.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-jai-2.0.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/vecmath-1.3.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/colt-1.2.0.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-algorithms-2.0.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/wstx-asl-3.2.6.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/concurrent-1.3.4.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-api-2.0.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/j3d-core-1.3.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-graph-impl-2.0.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-visualization-2.0.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-3d-2.0.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/jung-io-2.0.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/jung/stax-api-1.0.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/httpclient-4.1.2.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/httpcore-4.1.2.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/commons-logging-1.1.1.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/commons-codec-1.4.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/smackx.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/smack.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${lib.dir}/json-smart-1.1.1.jar" />
</zip>
</target>
<target name="dist-web" depends="compile, updateversion" description="build webstart application jar files">
<mkdir dir="${site.dir}/lib"/>
<jar destfile="${site.dir}/lib/jlm-webstart.jar" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Built-By" value="M. Quinson and G. Oster" />
<attribute name="Main-Class" value="jlm.ui.JavaLearningMachine" />
<attribute name="Class-Path" value="." />
</manifest>
<fileset dir="${classes.dir}" excludes="**/.gitignore **/*.java **/*.css **/*.html"/>
<fileset dir="${src.dir}" includes="**/*.java **/*.py **/*.html **/*.css **/*.map **/*.png" excludes="**/.gitignore"/>
<fileset dir="${lib.dir}" excludes="*.jar"/>
<fileset dir="${lib.dir}/jung" excludes="*.jar"/>
</jar>
<copy todir="${site.dir}/lib">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</copy>
<copy todir="${site.dir}/lib">
<fileset dir="${lib.dir}/jung">
<include name="*.jar"/>
</fileset>
</copy>
<signjar alias="${keystore.alias}" keystore="${keystore.file}" storepass="${keystore.passwd}" lazy="true">
<path>
<fileset dir="${site.dir}/lib" includes="**/*.jar" />
</path>
</signjar>
</target>
<target name="javadoc" description="Create Javadocs">
<mkdir dir="${site.dir}/javadoc/"/>
<javadoc
destdir="${site.dir}/javadoc/">
<fileset dir="${src.dir}/jlm" includes="**/*.java" />
<fileset dir="${src.dir}/universe" includes="**/*.java" />
</javadoc>
</target>
<target name="tar" description="Create a tar file containing the sources">
<tar destfile="${dist.dir}/jlm-${jlm.version}.tar.gz" compression="gzip"
basedir="."
includes="ChangeLog build.xml src/**/*.py src/**/*.java src/**/*.html src/**/*.css src/**/*.png src/**/*.map lib/resources/**"
excludes="**/.gitignore" />
</target>
<target name="updateversion" description="Update the version number in the properties file">
<propertyfile file="${lib.dir}/resources/jlm.configuration.properties">
<entry key="jlm.minor.version" value="${jlm.version}" operation="="/>
</propertyfile>
</target>
</project>