-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.xml
90 lines (77 loc) · 2.97 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="NwcTxt2MusicXML">
<property name="debuglevel" value="source,lines,vars" />
<property name="target" value="1.6" />
<property name="source" value="1.6" />
<property name="outdir" value="build" />
<property name="java.test.reports.path" value="tests-reports" />
<property name="java.src.build.path" value="bin" />
<property name="java.test.build.path" value="bin-tests" />
<path id="NwcTxt2MusicXML.classpath">
<pathelement location="bin" />
</path>
<path id="NwcTxt2MusicXML.classpath.tests">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="init">
<mkdir dir="${java.src.build.path}" />
<copy includeemptydirs="false" todir="bin">
<fileset dir="src" excludes="**/*.launch, **/*.java" />
</copy>
</target>
<target name="clean">
<delete dir="${java.src.build.path}" />
<delete dir="${java.test.build.path}" />
</target>
<target depends="clean" name="cleanall" />
<target depends="build.java.src" name="build" />
<target depends="init" name="build.java.src">
<echo message="${ant.project.name}: ${ant.file}" />
<javac debug="true" debuglevel="${debuglevel}" destdir="${java.src.build.path}" source="${source}" target="${target}">
<src path="src" />
<classpath refid="NwcTxt2MusicXML.classpath" />
</javac>
</target>
<target depends="init" name="build.java.tests">
<echo message="${ant.project.name}: ${ant.file}" />
<mkdir dir="${java.test.build.path}" />
<javac debug="true" debuglevel="${debuglevel}" destdir="${java.test.build.path}" source="${source}" target="${target}">
<src path="tests" />
<classpath>
<path refid="NwcTxt2MusicXML.classpath" />
<pathelement location="${java.src.build.path}" />
<path refid="NwcTxt2MusicXML.classpath.tests" />
</classpath>
</javac>
</target>
<target depends="build.java.src" name="package">
<jar destfile="${outdir}/${ant.project.name}.jar" basedir="bin">
</jar>
</target>
<target depends="build.java.src" name="package.nwc.usertool">
<jar destfile="${outdir}/nwc2musicxml.jar" manifest="nwcut.mf" basedir="bin">
</jar>
</target>
<target name="test.java" depends="build.java.src, build.java.tests">
<mkdir dir="${java.test.reports.path}" />
<junit haltonfailure="true" printsummary="true" fork="true" dir="${basedir}">
<classpath>
<path refid="NwcTxt2MusicXML.classpath" />
<pathelement location="${java.src.build.path}" />
<pathelement location="${java.test.build.path}" />
<path refid="NwcTxt2MusicXML.classpath.tests" />
</classpath>
<!-- add to see errors on console while running junit tests.-->
<formatter type="brief" usefile="false" />
<formatter type="xml" />
<batchtest fork="yes" todir="${java.test.reports.path}">
<fileset dir="${java.test.build.path}/">
<include name="**/*Test*.class" />
<exclude name="**/*$*.class" />
</fileset>
</batchtest>
</junit>
</target>
</project>