-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
154 lines (141 loc) · 5.16 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="diringest" default="dist" basedir=".">
<loadproperties srcFile="build.properties"/>
<property name="diringest.version" value="1.2"/>
<path id="all-jars.path">
<pathelement location="${lib.base64}"/>
<pathelement location="${lib.jrdf}"/>
<pathelement location="${lib.trippi}"/>
<pathelement location="${lib.httpclient}"/>
<pathelement location="${lib.codec}"/>
<pathelement location="${lib.logging}"/>
<pathelement location="${lib.log4j}"/>
<pathelement location="${lib.xerces}"/>
<pathelement location="${lib.xml-apis}"/>
<pathelement location="${lib.fedoraclient}"/>
<pathelement location="${lib.cos}"/>
<pathelement location="${lib.servlet}"/>
<pathelement location="${lib.saaj}"/>
<pathelement location="${lib.axis}"/>
<pathelement location="${lib.wsdl4j}"/>
<pathelement location="${lib.jaxrpc}"/>
<pathelement location="${lib.discovery}"/>
<pathelement location="${lib.xmlpull}"/>
<pathelement location="${lib.xpp}"/>
</path>
<target name="classes"
depends="prep"
description="build all java classes into temp/classes">
<javac srcdir="src/java" destdir="temp/classes"
includes="**"
classpathref="all-jars.path"
optimize="${optimize}" debug="${debug}"/>
</target>
<target name="binrelease" depends="dist, doc">
<copy todir="dist/release/diringest-${diringest.version}">
<fileset dir="dist">
<exclude name="release/**"/>
</fileset>
</copy>
<zip zipfile="dist/release/diringest-${diringest.version}.zip" basedir="dist/release" includes="diringest-${diringest.version}/**"/>
<delete dir="dist/release/diringest-${diringest.version}"/>
</target>
<target name="srcrelease" depends="clean">
<copy todir="dist/release/diringest-${diringest.version}-src">
<fileset dir=".">
<exclude name="dist/**"/>
</fileset>
</copy>
<zip zipfile="dist/release/diringest-${diringest.version}-src.zip" basedir="dist/release" includes="diringest-${diringest.version}-src/**"/>
<delete dir="dist/release/diringest-${diringest.version}-src"/>
</target>
<target name="release" depends="srcrelease,binrelease" description="Build the source and binary distributions in dist/release">
<checksum fileext=".md5">
<fileset dir="dist/release">
<include name="*.zip"/>
</fileset>
</checksum>
</target>
<target name="dist" depends="sip2fox, diringest">
<copy todir="dist">
<fileset dir="src/dist"/>
</copy>
</target>
<target name="diringest"
depends="classes"
description="build the diringest war file in dist">
<copy todir="temp/webapp">
<fileset dir="src/webapp"/>
</copy>
<mkdir dir="temp/webapp/WEB-INF/classes"/>
<copy todir="temp/webapp/WEB-INF/classes">
<fileset dir="temp/classes"/>
<fileset dir="src/config"/>
</copy>
<mkdir dir="temp/webapp/WEB-INF/lib"/>
<copy todir="temp/webapp/WEB-INF/lib">
<fileset dir="lib">
<exclude name="servlet-2.3.jar"/>
</fileset>
</copy>
<jar jarfile="dist/diringest.war" basedir="temp/webapp"/>
</target>
<target name="sip2fox"
depends="classes"
description="build the sip2fox distribution in dist/sip2fox">
<mkdir dir="dist/sip2fox"/>
<mkdir dir="dist/sip2fox/lib"/>
<jar jarfile="dist/sip2fox/lib/sip2fox.jar" basedir="temp/classes" manifest="src/mfs/sip2fox.mfs"/>
<copy todir="dist/sip2fox/lib">
<fileset dir="lib">
<exclude name="servlet-2.3.jar"/>
<exclude name="cos.jar"/>
<exclude name="saaj.jar"/>
<exclude name="axis.jar"/>
<exclude name="jaxrpc.jar"/>
<exclude name="commons-discovery.jar"/>
</fileset>
</copy>
<copy todir="dist/sip2fox">
<fileset dir="src/bat"/>
<fileset dir="src/sh"/>
</copy>
<mkdir dir="dist/sip2fox/samples"/>
<zip zipfile="dist/sip2fox/samples/one.zip" basedir="src/samples/one"/>
<zip zipfile="dist/sip2fox/samples/two.zip" basedir="src/samples/two"/>
<zip zipfile="dist/sip2fox/samples/three.zip" basedir="src/samples/three"/>
<copy todir="dist/sip2fox/samples" file="src/samples/readme.txt"/>
<copy todir="dist/sip2fox/config">
<fileset dir="src/config"/>
</copy>
</target>
<target name="doc"
depends="prep"
description="Build the documentation in dist/doc">
<mkdir dir="dist/doc"/>
<copy todir="dist/doc">
<fileset dir="src/doc"/>
</copy>
<javadoc
classpathref="all-jars.path"
sourcepath="src/java"
destdir="dist/doc/api"
use="true"
windowtitle="diringest Javadocs">
<fileset dir="src/java" defaultexcludes="yes">
<include name="fedora/services/diringest/**" />
</fileset>
</javadoc>
</target>
<target name="prep"
description="prepare for a build">
<mkdir dir="temp"/>
<mkdir dir="temp/classes"/>
<mkdir dir="dist"/>
</target>
<target name="clean"
description="remove all build-generated stuff">
<delete dir="temp"/>
<delete dir="dist"/>
</target>
</project>