File: build.xml

package info (click to toggle)
xslthl 2.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 592 kB
  • ctags: 356
  • sloc: xml: 3,651; java: 2,270; sh: 11; makefile: 5
file content (85 lines) | stat: -rw-r--r-- 2,407 bytes parent folder | download
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
<?xml version="1.0" encoding="utf-8"?>
<project name="xslthl" default="build">

	<target name="rebuild" depends="clean,build" description="Rebuild all" />

	<target name="clean" description="Clean the intermediate files and distribution">
		<delete dir="build" />
		<delete dir="dist" />
		<ant dir="examples" target="clean" />
		<delete>
			<fileset dir="test">
				<include name="**/*.class" />
			</fileset>
		</delete>
	</target>

	<target name="init">
		<mkdir dir="build" />
		<mkdir dir="dist" />
		<loadproperties srcFile="src/main/java/net/sf/xslthl/version.properties">
			<filterchain>
				<deletecharacters chars=" \t" />
			</filterchain>
		</loadproperties>
	</target>

	<target name="build" depends="jar,distmisc" description="Build the Xslthl distribution" />

	<target name="examples" depends="build" description="Run the examples">
		<ant dir="examples" target="build" />
	</target>

	<target name="compile" depends="init">
		<javac srcdir="src/main/java" destdir="build" target="1.5">
			<classpath>
				<fileset dir="lib" includes="**/*.jar" />
			</classpath>
		</javac>
		<copy todir="build">
			<fileset dir="src/main/java">
				<include name="**/*.properties" />
			</fileset>
		</copy>
	</target>

	<target name="jar" depends="compile">
		<jar jarfile="dist/xslthl-${xslthl.version.major}.${xslthl.version.minor}.${xslthl.version.revision}${xslthl.version.type}.jar">
			<fileset dir="build">
				<include name="**/*.class" />
				<include name="**/*.properties" />
			</fileset>
		</jar>
	</target>

	<target name="distmisc" depends="init">
		<fileset dir="${basedir}" id="files.misc">
			<include name="LICENSE.txt" />
			<include name="highlighters/*.xml" />
		</fileset>
		<copy todir="dist">
			<fileset refid="files.misc" />
		</copy>
		<zip destfile="dist/xslthl-${xslthl.version.major}.${xslthl.version.minor}.${xslthl.version.revision}${xslthl.version.type}.zip">
			<fileset refid="files.misc" />
			<fileset dir="dist">
				<include name="xslthl-*.jar" />
			</fileset>
		</zip>
	</target>

	<target name="test" depends="jar" description="Run unit tests">
		<junit printsummary="yes" haltonfailure="yes">
			<classpath>
				<pathelement location="build" />
				<fileset dir="lib" includes="**/*.jar" />
			</classpath>
			<batchtest>
				<fileset dir="src/test/java">
					<include name="**/*Test*.java" />
				</fileset>
			</batchtest>
		</junit>
	</target>

</project>