forked from krka/kahlua2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebstart.xml
59 lines (47 loc) · 2.08 KB
/
webstart.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
<?xml version="1.0"?>
<project name="webstart" default="build-webstart" basedir=".">
<dirname property="baseDir" file="${ant.file}"/>
<property name="deploy.dir" location="${baseDir}/webstart"/>
<property name="webstart.build.dir" value="${baseDir}/bin/webstart"/>
<property name="webstart.jar.name" value="${name}.jar"/>
<property name="webstart.signed.dir" value="${webstart.build.dir}/${name}"/>
<property name="libs.dir" value="${webstart.build.dir}"/>
<path id="dist.classpath">
<fileset dir="${libs.dir}" includes="**/*.jar, **/*.zip" />
</path>
<property name="password" value="9agd97atwd97tawd89raw" />
<target name="generate-key">
<genkey keystore="kahlua.keystore" alias="kahlua2" storepass="${password}"
dname="CN=Kahlua,L=Stockholm,O=Kahlua,C=SE">
</genkey>
</target>
<target name="build-webstart">
<fail unless="name" message="usage: ant -f webstart.xml build-webstart -Dname=kahlua2-v1"/>
<delete dir="${webstart.build.dir}" />
<mkdir dir="${webstart.build.dir}"/>
<manifestclasspath taskname="setup-manifest" property="dist.manifest.classpath" jarfile="${webstart.build.dir}/${webstart.jar.name}">
<classpath refid="dist.classpath" />
</manifestclasspath>
<jar destfile="${webstart.build.dir}/${webstart.jar.name}" manifest="${deploy.dir}/MANIFEST.MF">
<fileset dir="${baseDir}/bin/classes/core" />
<fileset dir="${baseDir}/bin/classes/j2se" />
<zipfileset src="${baseDir}/j2se/lib/jsyntaxpane-0.9.5.jar" prefix="" />
<manifest>
<attribute name="Class-Path" value="${dist.manifest.classpath}"/>
</manifest>
</jar>
<mkdir dir="${webstart.signed.dir}"/>
<signjar destDir="${webstart.signed.dir}" alias="kahlua2" keystore="kahlua.keystore" storepass="${password}">
<path>
<fileset dir="${webstart.build.dir}" includes="**/*.jar"/>
</path>
<flattenmapper/>
</signjar>
<copy tofile="${webstart.signed.dir}/${name}.jnlp" file="${deploy.dir}/kahlua2.jnlp" />
<replace
file="${webstart.signed.dir}/${name}.jnlp"
token="@NAME@"
value="${name}"
/>
</target>
</project>