-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
93 lines (80 loc) · 3.18 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2012, The SAVI Project. All rights reserved.
Griffin
Main ant file.
Mohammad Sadegh Faraji <[email protected]>
-->
<project name="Griffin" default="all" xmlns:ivy="antlib:org.apache.ivy.ant">
<!-- General Information -->
<property name="PROJECT_NAME" value="griffin" />
<property name="VERSION" value="0.1" />
<property name="TEST_SUITE_CLASS" value="ca.savi.authentication.AllTests" />
<property name="DEBUG" value="true" />
<!--Directories -->
<property name="SAVI_HOME" value="../" />
<property name="PROJECT_HOME" value="./" />
<property name="BUILD_DIR" value="${PROJECT_HOME}/build/" />
<property name="CLASSES_DIR" value="${PROJECT_HOME}/build/classes/" />
<property name="DIST_DIR" value="${PROJECT_HOME}/dist/" />
<property name="GEN_DIR" value="${PROJECT_HOME}/build/gen-src/" />
<property name="GEN_SRC_DIR" value="${PROJECT_HOME}/${GEN_DIR}/java/" />
<property name="LIB_DIR" value="${PROJECT_HOME}/build/lib/" />
<property name="SRC_DIR" value="${PROJECT_HOME}/src/" />
<property name="SRC_TEST_DIR" value="${PROJECT_HOME}/test/java/" />
<!-- CLASSPATH -->
<path id="classpath.lib">
<fileset dir="${LIB_DIR}" includes="*.jar" />
<fileset dir="${PROJECT_HOME}/libs/" includes="*.jar" />
</path>
<path id="classpath.all">
<path refid="classpath.lib" />
<pathelement location="${CLASSES_DIR}" />
</path>
<!-- Targets -->
<target name="prepare">
<mkdir dir="${BUILD_DIR}" />
<mkdir dir="${CLASSES_DIR}" />
<mkdir dir="${DIST_DIR}" />
<mkdir dir="${GEN_DIR}" />
<mkdir dir="${GEN_SRC_DIR}" />
<mkdir dir="${LIB_DIR}" />
<mkdir dir="${SRC_TEST_DIR}"/>
</target>
<target name="deps" depends="prepare">
<ivy:configure file="ivy-settings.xml" override="true" />
<ivy:retrieve refresh="true" type="jar,bundle" pattern="${LIB_DIR}/[artifact].[ext]" />
</target>
<target name="build" depends="deps">
<javac srcdir="${SRC_DIR}:${GEN_SRC_DIR}" includeantruntime="false" destdir="${CLASSES_DIR}" debug="${DEBUG}">
<classpath refid="classpath.lib" />
</javac>
</target>
<target name="build-test" depends="build">
<javac srcdir="${SRC_TEST_DIR}:${GEN_SRC_DIR}" includeantruntime="false" destdir="${CLASSES_DIR}" debug="${DEBUG}">
<classpath refid="classpath.lib" />
</javac>
</target>
<target name="test" depends="build-test">
<junit>
<classpath refid="classpath.all" />
<formatter type="brief" usefile="false" />
<test name="${TEST_SUITE_CLASS}" />
</junit>
</target>
<target name="dist" depends="build">
<jar destfile="${DIST_DIR}/${PROJECT_NAME}-${VERSION}.jar">
<fileset dir="${CLASSES_DIR}">
<include name="**/*" />
</fileset>
</jar>
</target>
<target name="all" depends="build">
</target>
<target name="clean">
<delete dir="${BUILD_DIR}">
</delete>
<delete dir="${DIST_DIR}">
</delete>
</target>
</project>