This repository was archived by the owner on Apr 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
67 lines (59 loc) · 2.61 KB
/
build.xml
File metadata and controls
67 lines (59 loc) · 2.61 KB
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
<project name="exist-jwt" default="xar">
<property name="dist.dir" value="dist"/>
<property name="build.dir" value="build"/>
<property name="src.dir" value="src"/>
<property name="java.src.dir" value="${src.dir}/main/java"/>
<property name="package.src.dir" value="${src.dir}/main/expath-pkg"/>
<property name="lib.dir" value="lib"/>
<property name="exist.version" value="2.2"/>
<property name="exist.href" value="https://github.com/eXist-db/mvn-repo/blob/master/org/exist-db/existdb-core/${exist.version}/existdb-core-${exist.version}.jar?raw=true"/>
<property name="xmldb.href" value="http://xmldb.exist-db.org/resources/xmldb.jar"/>
<property name="jose4j.version" value="0.4.2"/>
<property name="jose4j.href" value="https://bitbucket.org/b_c/jose4j/downloads/jose4j-${jose4j.version}.jar"/>
<path id="classpath">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<!-- dependencies -->
<condition property="haveLibs">
<and>
<available file="${lib.dir}/exist-core.jar"/>
<available file="${lib.dir}/jose4j.jar"/>
<available file="${lib.dir}/xmldb.jar"/>
</and>
</condition>
<target name="dependencies" unless="${haveLibs}">
<mkdir dir="${lib.dir}"/>
<get src="${xmldb.href}" dest="${lib.dir}/xmldb.jar"/>
<get src="${exist.href}" dest="${lib.dir}/exist-core.jar"/>
<get src="${jose4j.href}" dest="${lib.dir}/jose4j.jar"/>
</target>
<!-- build -->
<target name="compile" depends="dependencies">
<mkdir dir="${build.dir}"/>
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="classpath"/>
</target>
<target name="jar" depends="compile">
<jar basedir="${build.dir}" destfile="${build.dir}/${ant.project.name}.jar" excludes="${ant.project.name}.jar"/>
</target>
<target name="xar" depends="jar">
<mkdir dir="${dist.dir}"/>
<zip destfile="${dist.dir}/${ant.project.name}.xar">
<zipfileset dir="${package.src.dir}"/>
<zipfileset dir="${build.dir}" includes="${ant.project.name}.jar" prefix="content"/>
<zipfileset dir="${lib.dir}" includes="jose4j.jar" prefix="content"/>
</zip>
</target>
<target name="dist" depends="xar"/>
<target name="dist-xar" depends="xar"/>
<target name="all" depends="xar"/>
<!-- clean -->
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="clean-deps">
<delete dir="${lib.dir}"/>
</target>
</project>