forked from mpatric/mp3agic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
108 lines (98 loc) · 3.11 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
107
108
<project name="mp3agic" basedir="." default="build">
<description>Build mp3agic</description>
<!-- property file -->
<property file="ant.properties"/>
<!-- classpath -->
<path id="main.classpath">
</path>
<path id="test.classpath">
<pathelement location="${junit-jar}"/>
<pathelement location="${bin-dir}"/>
</path>
<!-- clean target -->
<target name="clean">
<delete dir="${bin-dir}"/>
<delete dir="${test-bin-dir}"/>
<delete dir="${build-dir}"/>
<delete dir="${doc-dir}"/>
<delete>
<fileset dir="." includes="**/*.bak"/>
<fileset dir="${test-res-dir}" includes="**/*.copy"/>
<fileset dir="${test-res-dir}" includes="**/*.retag"/>
</delete>
</target>
<!-- compile target -->
<target name="compile">
<mkdir dir="${bin-dir}"/>
<javac deprecation="on"
srcdir="${src-dir}"
destdir="${bin-dir}"
classpathref="main.classpath"
target="${compile-target}"
debug="${compile-debug}"/>
</target>
<!-- compile-tests target -->
<target name="compile-tests" depends="compile">
<mkdir dir="${test-bin-dir}"/>
<javac deprecation="on"
srcdir="${test-src-dir}"
destdir="${test-bin-dir}"
classpathref="test.classpath"
target="${compile-target}"
debug="${compile-debug}"/>
</target>
<!-- unit-test target -->
<target name="unit-test" depends="compile,compile-tests">
<junit haltonfailure="yes">
<formatter type="plain" usefile="false"/>
<classpath>
<path refid="test.classpath"/>
<pathelement location="${test-bin-dir}"/>
</classpath>
<batchtest fork="yes" todir=".">
<fileset dir="${test-bin-dir}">
<include name="**/*Test.class"/>
</fileset>
</batchtest>
</junit>
</target>
<!-- build target -->
<target name="build" depends="unit-test">
<mkdir dir="${build-dir}"/>
<jar destfile="${build-dir}/${jar-file}"
basedir="${bin-dir}"/>
<copy todir="${build-dir}">
<fileset dir="${scripts-dir}" />
</copy>
<replace dir="${build-dir}" value="${deploy-dir}">
<include name="**/*"/>
<exclude name="**/*.jar"/>
<replacetoken>@deploy-dir</replacetoken>
</replace>
</target>
<!-- deploy target -->
<target name="deploy" depends="build">
<copy todir="${deploy-dir}">
<fileset dir="${build-dir}" />
</copy>
<chmod perm="+x" file="${deploy-dir}/mp3cat"/>
<chmod perm="+x" file="${deploy-dir}/mp3details"/>
<chmod perm="+x" file="${deploy-dir}/mp3move"/>
<chmod perm="+x" file="${deploy-dir}/mp3pics"/>
<chmod perm="+x" file="${deploy-dir}/mp3rename"/>
<chmod perm="+x" file="${deploy-dir}/mp3retag"/>
</target>
<!-- doc target -->
<target name="doc">
<mkdir dir="${doc-dir}"/>
<javadoc destdir="${doc-dir}" access="${javadoc-access}">
<sourcepath>
<pathelement location="${src-dir}"/>
</sourcepath>
<package name="com.mpatric.mp3agic.*"/>
<classpath refid="main.classpath"/>
<doctitle><![CDATA[${javadoc-title}]]></doctitle>
<bottom><![CDATA[${javadoc-footer-message}]]></bottom>
</javadoc>
</target>
</project>