-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
134 lines (111 loc) · 4.61 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Matrix" default="deploy" basedir=".">
<target name="init-constants">
<!-- enable logging of the build output-->
<record name="${basedir}/build.log" append="no" />
<!-- try to load a local propertieus file -->
<property file="project.properties" />
<fail message="Property module.version was not found. Have you copied project.properties.sample to project.properties and adjusted the parameters???" unless="module.version" />
<!-- build bootstrap library -->
<!-- useNativePath - oder so: nachschlagen wg. Ant 1.8! -->
<!--ant antfile="${libs.bootstrap}/build.xml" target="jar" dir="${libs.bootstrap}" useNativeBasedir="true">
<property file="${libs.bootstrap}/project.properties"/>
</ant-->
<ant antfile="${libs.bootstrap}/build.xml" target="jar" dir="${libs.bootstrap}">
<property file="${libs.bootstrap}/project.properties"/>
</ant>
<!-- do not change these properties here, do change project.properties file, instead -->
<property name="build.path" value="build">
</property>
<property name="source.java" value="${basedir}/src/java" />
<property name="source.java.kdd2010" value="${basedir}/src/kdd2010/java" />
<property name="source.java.kdd2011" value="${basedir}/src/kdd2011/java" />
<property name="tests.java" value="${basedir}/src/tests/java" />
<patternset id="thirdparty.patternset">
<include name="*.jar" />
</patternset>
<!-- The combined library classpath -->
<path id="thirdparty.classpath">
<fileset dir="${basedir}/antlibs">
<patternset refid="thirdparty.patternset" />
</fileset>
<fileset dir="${basedir}/lib">
<patternset refid="thirdparty.patternset" />
</fileset>
</path>
<!-- The classpath required to build classes. -->
<path id="javac.classpath">
<path refid="thirdparty.classpath" />
<fileset file="${libs.bootstrap}/output/*.jar" />
</path>
</target>
<!-- ================================================================== -->
<!-- clean the whole output folder -->
<!-- ================================================================== -->
<target name="clean" depends="init-constants">
<record name="${basedir}/build.log" action="stop" />
<delete file="${base-dir}/build.log" quiet="true" failonerror="false" />
<delete dir="${build.path}/classes" />
<delete dir="${basedir}/output" />
</target>
<!-- Compile all class files -->
<target name="compile-classes" depends="init-constants">
<mkdir dir="${build.path}/classes" />
<javac destdir="${build.path}/classes"
optimize="${maven.compile.optimize}"
debug="${maven.compile.debug}"
depend="${javac.depend}"
verbose="${maven.compile.verbose}"
deprecation="${maven.compile.deprecation}"
includeAntRuntime="${javac.include.ant.runtime}"
includeJavaRuntime="${javac.include.java.runtime}"
failonerror="true">
<src path="${source.java}" />
<classpath refid="javac.classpath" />
</javac>
</target>
<target name="compile" depends="compile-classes" description="Compile all source files for the core module.">
<copy todir="${build.path}/classes">
<fileset dir="${source.java}">
<exclude name="**/*.class" />
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="jar" depends="compile" description="Builds jars for core module.">
<delete dir="${basedir}/output" />
<mkdir dir="${basedir}/output" />
<jar jarfile="${basedir}/output/${module.name}-${module.version}.jar">
<fileset dir="${build.path}/classes" includes="**" />
</jar>
</target>
<target name="deploy" depends="compile" description="Builds jars for core module." >
<delete dir="${basedir}/output" />
<mkdir dir="${basedir}/output" />
<jar jarfile="${basedir}/output/${module.name}-${module.version}.jar">
<fileset dir="${build.path}/classes" includes="**" />
</jar>
<copy todir="${basedir}/output">
<fileset dir="${basedir}/lib">
<include name="**/*.jar" />
</fileset>
<fileset dir="${basedir}/antlibs">
<include name="**/*.jar" />
</fileset>
<fileset dir="${libs.bootstrap}/output" >
<include name="**"/>
</fileset>
<fileset dir="${libs.bootstrap}/scripts" >
<include name="run.sh"/>
</fileset>
<fileset dir="${basedir}/scripts">
<exclude name="run.sh.sample"/>
</fileset>
</copy>
<chmod perm="0755">
<fileset dir="${basedir}/output">
<include name="**/*.sh" />
</fileset>
</chmod>
</target>
</project>