-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
106 lines (90 loc) · 3.51 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Copyright 2009 Victor Igumnov <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<project default="compile" name="tcache" basedir=".">
<property name="src.dir" value="src/java"/>
<property name="build.dir" value="target/"/>
<property name="build.dir.classes" value="${build.dir}/classes"/>
<path id="project.classpath">
<pathelement location="${build.dir}"/>
<fileset dir="libs/">
<include name="**/*.jar"></include>
</fileset>
</path>
<target name="compile">
<mkdir dir="${build.dir.classes}"/>
<javac srcdir="${src.dir}" destdir="${build.dir.classes}" classpathref="project.classpath">
<include name="**/*.java"/>
</javac>
<copy todir="${build.dir.classes}">
<fileset dir="${src.dir}">
<include name="**/*.*" />
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="init" description="o Creates all directories for building">
<mkdir dir="${build.dir.classes}" />
</target>
<target name="jar" depends="compile" description="o Creates a JAR file for this package">
<mkdir dir="${build.dir.classes}" />
<manifestclasspath property="dist.manifest.classpath" jarfile="${build.dir}/tcache.jar">
<classpath refid="project.classpath" />
</manifestclasspath>
<jar destfile="${build.dir}/tcache.jar"
excludes="**/package.html" basedir="${build.dir}/classes" includes="**/*.class"
>
<fileset dir="${src.dir}">
<include name="**/*"/>
</fileset>
<zipfileset src="libs/ehcache-core-2.1.0.jar"/>
<zipfileset src="libs/memcached-2.5.jar"/>
<zipfileset src="libs/memcached-trunk.jar"/>
<zipfileset src="libs/spy-2.4.jar"/>
<fileset dir="${src.dir}" includes="*.*" />
<manifest>
<attribute name="Class-Path" value="${dist.manifest.classpath}"/>
</manifest>
</jar>
</target>
<target name="contrib" depends="compile" description="o Creates a JAR file for this package">
<mkdir dir="${build.dir.classes}" />
<manifestclasspath property="dist.manifest.classpath" jarfile="contrib-cache.jar">
<classpath refid="project.classpath" />
</manifestclasspath>
<jar destfile="contrib-cache.jar"
excludes="**/package.html" basedir="${build.dir}/classes" includes="**/*.class"
>
<fileset dir="${src.dir}">
<include name="**/*"/>
</fileset>
<zipfileset src="libs/ehcache-core-2.1.0.jar"/>
<zipfileset src="libs/memcached-2.5.jar"/>
<zipfileset src="libs/memcached-trunk.jar"/>
<zipfileset src="libs/spy-2.4.jar"/>
<fileset dir="${src.dir}" includes="*.*" />
<manifest>
<attribute name="Class-Path" value="${dist.manifest.classpath}"/>
</manifest>
</jar>
</target>
<target name="clean" description="o Cleans up the build artifacts">
<delete dir="${build.dir}" failonerror="false" />
<delete file="tcache.jar" failonerror="false" />
</target>
</project>