-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.xml
94 lines (76 loc) · 2.8 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2010 Preemptive Labs / Andreas Bielk (http://preemptive.se)
~
~ 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 name="labs-redis" default="all">
<property name="target" value="${basedir}/build.ant"/>
<property name="core.output" value="${target}/production/core"/>
<property name="test.output" value="${target}/test/core"/>
<property name="core.packagefile" value="${ant.project.name}-0.1.0.ALPHA.jar"/>
<property name="compiler.args" value="-target 1.6"/>
<path id="core.classpath">
<fileset dir="${basedir}/lib">
<include name="*.jar"/>
</fileset>
</path>
<path id="core.sourcepath">
<dirset dir="${basedir}">
<include name="src/main/java"/>
</dirset>
</path>
<path id="test.sourcepath">
<dirset dir="${basedir}">
<include name="src/test/java"/>
</dirset>
</path>
<target name="compile.core.production" description="Compile core">
<mkdir dir="${core.output}"/>
<javac destdir="${core.output}" >
<compilerarg line="${compiler.args}"/>
<classpath refid="core.classpath"/>
<src refid="core.sourcepath"/>
<!--<patternset refid="excluded.from.compilation.core"/>-->
</javac>
<!--
<copy todir="${core.output}">
<fileset dir="${basedir}/src/main/java">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
-->
</target>
<target name="compile.core.test" depends="compile.core.production" description="Compile tests">
<mkdir dir="${test.output}"/>
<javac destdir="${test.output}" >
<compilerarg line="${compiler.args}"/>
<classpath>
<path refid="core.classpath"/>
<pathelement location="${core.output}"/>
</classpath>
<src refid="test.sourcepath"/>
<!--<patternset refid="excluded.from.compilation.core"/>-->
</javac>
</target>
<target name="jar" depends="compile.core.production" description="create jar">
<jar destfile="${target}/${core.packagefile}" duplicate="preserve" filesetmanifest="mergewithoutmain">
<zipfileset dir="${core.output}"/>
</jar>
</target>
<target name="clean" description="cleanup">
<delete dir="${target}"/>
</target>
<target name="all" depends="jar" description="build all"/>
</project>