/
build.xml
86 lines (76 loc) · 2.84 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
<?xml version="1.0"?>
<project name="pkg-java" default="junit" basedir=".">
<property name="build.sourceDirectory" value="infinitypfm-common/src/main/java" />
<property name="build.testDir" value="infinitypfm-common/src/test/java" />
<property name="build.directory" value="build" />
<property name="build.outputDirectory" value="${build.directory}/classes" />
<property name="classpath" value="/usr/share/java/commons-codec.jar:/usr/share/java/commons-lang.jar:/usr/share/java/gettext-commons.jar:/usr/share/java/jackson-core-lgpl.jar:/usr/share/java/mailapi.jar:/usr/share/java/junit4.jar:/usr/share/java/hamcrest-core-1.3.jar" />
<property name="jar" value="target/infinitypfm-common.jar" />
<path id="src.path">
<pathelement location="${build.sourceDirectory}" />
<pathelement location="${build.testDir}" />
</path>
<target name="clean">
<delete dir="${build.directory}" />
<delete file="${jar}" />
</target>
<target name="compile" depends="clean">
<mkdir dir="${build.outputDirectory}" />
<copy todir="${build.outputDirectory}/org/infinitypfm/core/data">
<fileset dir="${build.sourceDirectory}/org/infinitypfm/core/data">
<include name="*.xml" />
</fileset>
</copy>
<copy todir="${build.outputDirectory}/org/infinitypfm/core/conf">
<fileset dir="${build.sourceDirectory}/org/infinitypfm/core/conf">
<include name="*.xml" />
</fileset>
</copy>
<antcall target="getres">
<param name="local" value="de"/>
</antcall>
<antcall target="getres">
<param name="local" value="tr"/>
</antcall>
<antcall target="getres">
<param name="local" value="es"/>
</antcall>
<javac destdir="${build.outputDirectory}" nowarn="true" debug="on">
<src refid="src.path" />
<classpath path="${classpath}" />
</javac>
<jar jarfile="${jar}" basedir="${build.outputDirectory}" />
</target>
<target name="getres">
<mkdir dir="${build.outputDirectory}/app/i18n" />
<exec dir="." executable="msgfmt" newenvironment="false">
<arg value="--verbose" />
<arg value="--java2" />
<arg value="-d" />
<arg value="${build.outputDirectory}" />
<arg value="-r" />
<arg value="app.i18n.Messages" />
<arg value="-l" />
<arg value="${local}" />
<arg value="${build.sourceDirectory}/org/infinitypfm/core/lang/po/${local}.po" />
</exec>
</target>
<target name="junit" depends="compile">
<junit printsummary="yes" haltonfailure="no">
<!--
<classpath location="lib/junit-4.11.jar" />
<classpath location="lib/hamcrest-core-1.3.jar" />
<classpath refid="test.path" /
-->
<classpath location="${classpath}" />
<classpath refid="src.path" />
<formatter type="xml" />
<formatter type="plain" />
<batchtest fork="yes" todir=".">
<fileset dir="${build.testDir}">
<include name="**/*Test*.java" />
</fileset>
</batchtest>
</junit>
</target>
</project>