At Edward's request, Vamp is no longer required to build our tools. It is still
required by anyone who wishes to cut a Java Web Start release. This should make it easier for a new developer to get up to speed.
This commit is contained in:
parent
86a729ee08
commit
010d8cb972
2 changed files with 193 additions and 130 deletions
114
jwsbuild.xml
Normal file
114
jwsbuild.xml
Normal file
|
@ -0,0 +1,114 @@
|
|||
<!-- @author David Chandler, dchandler@users.sourceforge.net
|
||||
|
||||
We have a document,
|
||||
http://thdltools.sourceforge.net/BuildSystems.html, that you
|
||||
probably should read. FIXME: update this document to describe
|
||||
the two-buildfile system.
|
||||
|
||||
-->
|
||||
|
||||
<project name="THDLTools" default="fail-nicely" basedir=".">
|
||||
|
||||
|
||||
<description>
|
||||
This Jakarta Ant buildfile is used to build the Java Web Start
|
||||
releases of Jskad, Savant, QuillDriver, and the Translation Tool.
|
||||
This is separate from build.xml because to use this build file,
|
||||
you must have installed the Venus Application Publisher's (Vamp's)
|
||||
Ant tasks. Read the comments of this buildfile to learn more, or
|
||||
see http://thdltools.sourceforge.net/BuildSystems.html.
|
||||
</description>
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- Ant extensions we use: -->
|
||||
<!-- -->
|
||||
<!-- See http://www.vamphq.com/ant.html for vamp*: -->
|
||||
<taskdef name="vampwar" classname="venus.ant.taskdefs.VampWar" />
|
||||
<taskdef name="vampinstaller" classname="venus.ant.taskdefs.VampInstaller" />
|
||||
|
||||
|
||||
<target name="fail-nicely" description="Tells the user to use build.xml, not this subbuildfile.">
|
||||
<fail message="Do not use this file directly; use build.xml file instead, which then uses this file."/>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="this-init">
|
||||
<!-- Create the time stamp -->
|
||||
<tstamp/>
|
||||
|
||||
<mkdir dir="${dist}/java-web-start"/>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="package-for-java-web-start"
|
||||
depends="this-init"
|
||||
description="Builds the Java Web Start version of ${my.app} given that you have compiled it (and from scratch, since our compilation procedure doesn't konw about dependencies)">
|
||||
|
||||
<!-- First, you must give the passwords so that we can sign the JARs. -->
|
||||
<fail message="Use 'ant -Dkeystore.password=psst' to sign a Java Web Start WAR file."
|
||||
unless="keystore.password"/>
|
||||
<fail message="Use 'ant -Ddgkey.password=psst' to sign a Java Web Start WAR file."
|
||||
unless="dgkey.password"/>
|
||||
|
||||
<!-- Use the Venus Application Publisher's (Vamp's) Ant task to
|
||||
create a .war file. If you use Tomcat or the like to
|
||||
distribute, then the WAR is all you need. If not, you don't
|
||||
need the full WAR file. You in fact need only the JAR file
|
||||
inside it. There is a ${my.app}.jnlp file inside it, too,
|
||||
but that file uses macros like $$name and $$codebase, which
|
||||
are only appropriate to Tomcat-type environments.
|
||||
|
||||
Thus, you non-Tomcat-users should run 'jar xf
|
||||
${my.app}-web-start.war ${my.app}-JWS.jar' to extract the
|
||||
signed JAR file and copy the .jar and the
|
||||
${dist}/${my.app}.jnlp file (NOT the one in the WAR) to the
|
||||
web server. (Be sure that the web server has its MIME types
|
||||
configured correctly so that the .jnlp file is served as an
|
||||
application/jnlp or the like, not text/xml.)
|
||||
|
||||
Yes, it means that we're requiring anyone who wishes to cut a
|
||||
JWS release to install vamp.jar, when we could use the
|
||||
built-in SignJar task instead for non-Tomcat-users. BUT,
|
||||
this method means that we're ready for a J2EE application
|
||||
server framework like the one at Virginia.
|
||||
|
||||
If you change web servers or the location on the web server
|
||||
where the JAR and jnlp file are located, you have to edit
|
||||
${my.app}.jnlp. Note that doing so will mean that users who've
|
||||
installed ${my.app} from the old location will NOT be able to
|
||||
seamlessly upgrade, so don't do this often.
|
||||
|
||||
To install the Vamp Ant task, visit
|
||||
'http://www.vamphq.com/ant.html' and follow the instructions.
|
||||
Note that you *CAN* just drop vamp.jar into Ant's 'lib'
|
||||
directory with Ant 1.5.1.
|
||||
|
||||
-->
|
||||
<vampwar dest="${dist}/java-web-start/${my.app}-web-start.war">
|
||||
<jnlp src="${dist}/${my.app}.jnlp">
|
||||
<resources>
|
||||
<fileset dir="${dist}/lib">
|
||||
<include name="${my.app}-JWS.jar" />
|
||||
</fileset>
|
||||
</resources>
|
||||
</jnlp>
|
||||
|
||||
<jarsigner
|
||||
keystore = "${keystore}"
|
||||
storepass = "${keystore.password}"
|
||||
keypass = "${dgkey.password}"
|
||||
alias = "${key.alias}"/>
|
||||
</vampwar>
|
||||
|
||||
<!-- Extract the JAR file: -->
|
||||
<unwar src="${dist}/java-web-start/${my.app}-web-start.war"
|
||||
dest="${dist}/java-web-start/">
|
||||
<patternset>
|
||||
<include name="${my.app}-JWS.jar"/>
|
||||
<exclude name="**/*"/>
|
||||
</patternset>
|
||||
</unwar>
|
||||
</target>
|
||||
|
||||
</project>
|
Loading…
Add table
Add a link
Reference in a new issue