forked from pablo-mayrgundter/freality
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
87 lines (78 loc) · 2.62 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Everything is shared up to target=test, then use target=print to see a
list of projects to build, or target=all (the default) for the whole
thing.
-->
<project name="freality" basedir="." default="test">
<property name="build" value="build"/>
<property name="classes" value="${build}/classes"/>
<property name="libs" value="${build}/libs"/>
<path id="classpath">
<pathelement path="."/>
<pathelement path="test"/>
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="classpath">
<property name="cp" refid="classpath"/>
<echo message="export CLASSPATH=${cp}"></echo>
</target>
<target name="init">
<mkdir dir="${build}"/>
<mkdir dir="${classes}"/>
<mkdir dir="${libs}"/>
</target>
<target name="clean">
<delete dir="${build}"/>
</target>
<target name="compile" depends="init">
<javac debug="on" destdir="${classes}" includeantruntime="false">
<compilerarg value="-Xlint"/>
<classpath refid="classpath"/>
<src path="."/>
</javac>
</target>
<target name="test" depends="compile">
<junit fork="true" showoutput="true">
<classpath>
<path>
<path refid="classpath"/>
<pathelement location="${classes}"/>
</path>
</classpath>
<formatter type="brief" usefile="false"/>
<test name="AllTests"/>
</junit>
</target>
<!-- TODO(pablo): move this to a sub-package include. -->
<target name="Notes.jar" depends="test">
<jar destfile="build/Notes.jar" basedir="${classes}" includes="os/**">
<manifest>
<attribute name="Main-Class" value="os.desktop.Notes"/>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Vendor" value="code.google.com/p/freality"/>
<attribute name="Implementation-Title" value="Notes"/>
<attribute name="Implementation-Version" value="0.1"/>
</manifest>
</jar>
</target>
<target name="jar" depends="test">
<jar destfile="build/${project}.jar" basedir="${classes}" includes="${project}/**">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Vendor" value="code.google.com/p/freality"/>
<attribute name="Implementation-Title" value="${project}"/>
<attribute name="Implementation-Version" value="0.1"/>
</manifest>
</jar>
</target>
<target name="war" depends="jar">
<copy toDir="${build}/war" failonerror="true">
<fileset dir="${project}/war">
<include name="**"/>
</fileset>
</copy>
</target>
</project>