-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.xml
108 lines (96 loc) · 4.21 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
<project name="CMME" default="dist-editor" basedir=".">
<description>Builds CMME applications/applet with Apache ANT</description>
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="resources" location="resources"/>
<property name="manifests" location="${src}/manifests"/>
<property name="classpath" location="${dist}/lib"/>
<property file="${dist}/cmme.properties"/>
<property name="target-version" value="1.6"/>
<property name="source-version" value="1.6"/>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init" description="compile source">
<javac srcdir="${src}" destdir="${build}" target="${target-version}" source="${source-version}"
debug="true" debuglevel="lines,vars,source" includeantruntime="false">
<!-- <compilerarg value="-Xlint:unchecked"/> -->
<classpath>
<fileset dir="${dist}/lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
<copy todir="${build}/data"><fileset dir="${dist}/data"/></copy>
</target>
<target name="dist-viewer" depends="compile"
description="generate viewer distribution">
<jar jarfile="${dist}/CMME-Viewer.jar" basedir="${build}"
manifest="${manifests}/manifest.delivery"
includes="DataStruct/*.class Gfx/*.class Util/*.class Viewer/*.class data/imgs/GUIicons/*.*"/>
</target>
<target name="dist-editor" depends="dist-viewer"
description="generate editor distribution">
<copy file="${resources}/cmme.xsd" todir="${build}/DataStruct"/>
<jar jarfile="${dist}/CMME-Editor.jar" basedir="${build}"
manifest="${manifests}/manifest.editor"
includes="DataStruct/*.class DataStruct/cmme.xsd Gfx/*.class Util/*.class Viewer/*.class Editor/*.class data/imgs/GUIicons/*.*"/>
</target>
<target name="dist-applet" depends="compile"
description="generate viewer distribution">
<jar jarfile="${dist}/cmmeViewer.jar" basedir="${build}"
manifest="${manifests}/manifest.applet"
includes="DataStruct/*.class Gfx/*.class Util/*.class Viewer/*.class data/imgs/GUIicons/*.*"/>
<signjar jar="${dist}/cmmeViewer.jar"
keystore="${dist}/${cmme.keystore}"
alias="${cmme.certalias}"
storepass="${cmme.certpass}"/>
</target>
<target name="generate-keystore"
description="create keystore containing PKCS12 certs">
<exec executable="keytool">
<arg line="-importkeystore"/>
<arg line="-srckeystore ${dist}/${cmme.certpfx}"/>
<arg line="-srcstoretype pkcs12"/>
<arg line="-srcstorepass ${cmme.certpass}"/>
<arg line="-destkeystore ${dist}/${cmme.keystore}"/>
<arg line="-deststoretype JKS"/>
<arg line="-deststorepass ${cmme.certpass}"/>
<arg line="-alias ${cmme.certalias}"/>
</exec>
</target>
<target name="sign-libs"
description="sign 3rd-party libraries">
<signjar jar="${dist}/lib/gnu-aelfred2.jar"
keystore="${dist}/${cmme.keystore}"
alias="${cmme.certalias}"
storepass="${cmme.certpass}"/>
<signjar jar="${dist}/lib/itext-1.3.jar"
keystore="${dist}/${cmme.keystore}"
alias="${cmme.certalias}"
storepass="${cmme.certpass}"/>
<signjar jar="${dist}/lib/jdom.jar"
keystore="${dist}/${cmme.keystore}"
alias="${cmme.certalias}"
storepass="${cmme.certpass}"/>
<signjar jar="${dist}/lib/jgraph.jar"
keystore="${dist}/${cmme.keystore}"
alias="${cmme.certalias}"
storepass="${cmme.certpass}"/>
<signjar jar="${dist}/lib/xercesImpl.jar"
keystore="${dist}/${cmme.keystore}"
alias="${cmme.certalias}"
storepass="${cmme.certpass}"/>
<signjar jar="${dist}/lib/xml-apis.jar"
keystore="${dist}/${cmme.keystore}"
alias="${cmme.certalias}"
storepass="${cmme.certpass}"/>
</target>
<target name="clean" description="remove compiled files">
<delete includeemptydirs="true">
<fileset dir="${build}" excludes="data/"/>
</delete>
</target>
</project>