Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
60 lines (47 sloc) 2.08 KB
<?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>