-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.xml
163 lines (143 loc) · 5.4 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?xml version="1.0" encoding="UTF-8"?>
<project name="Krextor" default="help" basedir=".">
<description>ant build file for the Krextor project</description>
<property file="krextor.build.properties" />
<path id="javac.classpath">
<!-- actually: lib/java, lib/saxon -->
<fileset dir="lib/java" includes="*.jar"/>
<fileset dir="lib/saxon" includes="saxon9.jar"/>
</path>
<path id="tests.classpath">
<path refid="javac.classpath"/>
<pathelement location="${build.java}"/>
</path>
<available property="junit.present" file="${java.lib}/junit-4.1.jar"/>
<target name="help">
<echo><![CDATA[
Krextor — The KWARC RDF Extractor
—————————————————————————————————————————————————————————————————————————
available targets:
dist – build distribution archives (not yet fully enabled)
jars – build the two krextor.jar files (with and without dependencies)
javac – compile Java sources
doc – generate all documentation
xsltdoc – generate XSLT source documentation
javadoc – generate Java API documentation
test – run JUnit test cases
clean – clean build output directory
help – print this help text
—————————————————————————————————————————————————————————————————————————
]]></echo>
</target>
<target name="xsltdoc">
<!-- <delete dir="doc" /> -->
<copy todir="${doc.dest}/xsltdoc">
<fileset dir="${xsltdoc.src}/css">
<filename name="*.css" />
</fileset>
</copy>
<java fork="true" jar="${saxon.jar}">
<arg value="${xsltdoc.src}/xsl/XSLTdocConfig.xml" />
<arg value="${xsltdoc.src}/xsl/xsltdoc.xsl" />
</java>
</target>
<target name="javadoc">
<javadoc
Windowtitle="Krextor Java Wrapper API Documentation"
access="public"
sourcepath="${java.src}"
classpathref="javac.classpath"
destdir="${doc.dest}/javadoc"
noindex="false"
nonavbar="false"
notree="false"
additionalparam="-notimestamp"
source="1.5"
splitindex="true"
use="true"
version="true"
breakiterator="yes">
<link href="http://java.sun.com/javase/6/docs/api/" />
<link href="http://www.xom.nu/apidocs/"/>
<link href="http://www.saxonica.com/documentation/javadoc/"/>
<link href="http://commons.apache.org/vfs/apidocs/"/>
</javadoc>
</target>
<target name="doc" depends="xsltdoc,javadoc"/>
<target name="dist" depends="doc,jars"/>
<target name="jars" depends="jar-single,jar-all"/>
<target name="javac">
<mkdir dir="${build.java}"/>
<javac target="1.5" debug="true" source="1.5" srcdir="${java.src}" destdir="${build.java}" classpathref="javac.classpath"/>
<copy todir="${build.java}/info/kwarc/krextor">
<fileset dir="${java.src}/info/kwarc/krextor" includes="xslt/**"/>
</copy>
</target>
<target name="javac.test" depends="javac">
<mkdir dir="${build.test}"/>
<javac target="1.5" debug="true" source="1.5" srcdir="${test.src}" destdir="${build.test}" classpathref="tests.classpath"/>
<copy todir="${build.testdata}">
<fileset dir="${testdata.src}"/>
</copy>
</target>
<target name="jar-all" depends="javac">
<!-- Copy the other JARs our JAR depends on -->
<copy todir="dist-all/lib">
<fileset dir="lib">
<include name="java/**"/>
<include name="saxon/saxon9.jar"/>
</fileset>
</copy>
<jar destfile="dist-all/krextor-${krextor.version}.jar" compress="yes" basedir="${build.java}">
<fileset dir="${basedir}">
<include name="krextor.build.properties"/>
</fileset>
<manifest>
<attribute name="Specification-Title" value="Krextor"/>
<attribute name="Specification-Version" value="${krextor.version}"/>
<attribute name="Built-By" value="${user.name}"/>
<!-- This JAR file is not currently executable
<attribute name="Main-Class" value="..."/>
-->
<attribute name="Class-Path" value="${jar.classpath}"/>
</manifest>
</jar>
</target>
<target name="jar-single" depends="javac">
<jar destfile="dist/krextor-${krextor.version}.jar" compress="yes" basedir="${build.java}">
<manifest>
<attribute name="Specification-Title" value="Krextor"/>
<attribute name="Specification-Version" value="${krextor.version}"/>
<attribute name="Built-By" value="${user.name}"/>
<!-- This JAR file is not currently executable
<attribute name="Main-Class" value="..."/>
-->
</manifest>
</jar>
</target>
<target name="clean">
<delete dir="${java.dest}"/>
<delete dir="dist"/>
<delete dir="dist-all"/>
</target>
<target name="test" if="junit.present" depends="javac.test">
<java fork="yes" classname="org.junit.runner.JUnitCore" taskname="junit" failonerror="yes">
<arg value="info.kwarc.krextor.AllTests"/>
<classpath>
<pathelement location="${build.java}"/>
<pathelement location="${build.test}"/>
<fileset dir="${java.lib}" includes="*.jar"/>
<fileset dir="${saxon.lib}" includes="saxon9.jar"/>
</classpath>
</java>
</target>
<!--
<target name="testUtil">
<xslt style="xsl/test/utilTest.xsl" in="xsl/test/dummy.xml" out="xsl/test/testResult.txt">
</xslt>
</target>
-->
</project>
<!--
vim:sw=2:sts=2
-->