Sophie Net: Vamp HQ - Luxor XUL - Rachel - Apollo - The Saturn Times - The Richmond Post
vamphq.com Logo
All the tools to deliver rich, cross-plattform, zero-admin desktop apps built on open standards today
About
OverviewFront Page
What's NewHistory As It Happens
Upcoming EventsWhere Do I Go Tommorrow?
ScreenshotsPictures, Pictures, Pictures
TestimonialsWhat Users Say About Vamp
CreditsThanks, Thanks, Thanks
ContactAre You Real? - Ich Spreche Deutsch
Site MapFind It Quick
Projects
Vamp StudioPackage, Sign and Publish Your App
Package ManagerCreate and Share Your Own CD App Collections
App CentralFind the Best Apps On The Web
JNLP ValidatorDTD, XML Schema, Relax
jnlp2htmlCreate Your Own App Catalog
Web Start Cache ExplorerUnder the Hood: Web Start's Cache Revealed
Web Start Cache UtilityInject Your App Into Web Start's Cache
Ant Task SuiteAutomate, Automate, Automate
vampgetGrab Apps for Offline Consumption
CD App InstallerCreate Your Own Single-Jar, Offline Installer
CD App Installer IICreate Your Onw Self-Executing, Single-Jar Installer
CD Installer MissionGreat Things Are Coming
Download
BinariesGet It Now
DocumentationPDF Booklets, Presentations
Support
DiscussionAsk Questions
FAQAnswer, Answers, Answers
Professional Services
InfoHire Me - Yes, I'm Available
Web Start
Web Start LinksEverything to Get Started
Unofficial FAQAnswers, Answers, Answers
JNLP Tag Quick ReferenceQuick Reference to Tags and Attributes
JNLP Tag ReferenceAll Tags Explained, Real-World Examples
Configuration ReferenceHand-tune Web Start's configuration (jawaws.cfg); all config settings explained
Offline Installer TutorialCreate Offline, No-Java, High-Speed Installer for Web Start under Windows
Installation ResourcesCreate Your Own Java Runtime Plus Web Start Installer
os and arch CollectionLinux, Windows, Mac, Solaris
Java 2 Runtime DirectoryLinux, Windows, Mac, Solaris
Web Start 2.0If I Were King
Print Version Print Version

Vamp's Ant Task Suite

Vamp's Ant Task Suite is now available for download download link.


Introduction

Venus Application Publisher (Vamp) supports Ant to allow you to fully automate your build including signing and packaging your applications into relocatable Web Archives that you can drop at your web server for single-click launching using the Java WebStart browser helper application. If you don't know what Ant is, check out the following links:

Installing Vamp's Ant Task Suite

The binary distribution of Vamp's Ant suite consists of a single jar called vamp.jar download link. The Java Archive vamp.jar contains everything you need. Add vamp.jar to your classpath and you are ready to run. Example:

set classpath=%classpath%;c:/vamp/lib/vamp.jar

To make Vamp's Ant tasks available in your build scripts, use the following task definitions:

<taskdef name="vampwar"       classname="venus.ant.taskdefs.VampWar" />
<taskdef name="vampinstaller" classname="venus.ant.taskdefs.VampInstaller" />

Note, that you cannot just drop vamp.jar into Ant's lib directory (e.g. c:/java/ant/v13/lib) because vamp.jar has to come before Ant's libraries. Even though vamp.jar will automatically be included to the classpath when Ant runs, it will unfortunately not work and you will end up with the following error:

Could not create task of type: vampwar due to java.lang.NoClassDefFoundError

This error happens when vamp.jar is not placed before Ant's libraries. The reason is that Vamp's Ant Task Suite requires a later version of JAXP than the JAXP library shipped with Ant.

Ant Task Suite

VampWar

Description

This task creates a Web Archive for easy deployment of Java applications using JavaWebStart. By default relocatable Web Archives will be created using Sun's jnlp-servlet. This task requires Venus Application Publisher. The latest version of Venus Application Publisher can be found at http://www.vamphq.com/.

The JNLP launch descricptor is defined by a nested jnlp tag. Jar signing can be configured using a nested jarsigner tag and Sun's jnlp-servlet can be configured using a nested jnlpservlet tag. Note, that the nested jnlp tag is required, jarsigner and jnlpservlet are optional, see nested elements for details.

Parameters

Attribute Description Required
dest The web archive (war-file) to create. Yes
jnlpservlet Indicates whether Sun's jnlp-servlet should be used or not (true/false). Default uses the jnlp-servlet to make the web archive relocatable. No

Nested Parameter Elements

jnlp

The nested jnlp element lets you specify the JNLP launch descriptor that you want to add to your web archive. Using nested resources and information elements lets you add or update icons, jars, native libs or extensions. Note, that the nested jnlp element is required.

Attribute Description Required
src The JNLP launch descriptor to use. Required

information

The nested information element lets you specify icons you want to update or add to the JNLP launch descriptor. You can use any number of nested filesets or icons. Note, that only files ending with gif, jpg or png will be accepted and that information must be defined inside a jnlp element.

Attribute Description Required
locale Specifies the locale for which this information element should be used. Optional
Examples
<information>
  <icon src="image/venus.gif" />
</information>

<information>
  <fileset dir="image">
    <include name="*.gif" />
  </fileset>
</information>

icon

The nested icon element lets you specify icons you want to update or add to the JNLP launch descriptor. Note, that only files ending with gif, jpg or png will be accepted and that icon must be defined inside an information element.

Attribute Description Required
src The icon file to include. Required

resources

The nested resources element lets you specify jars, native libs and extensions that you want to update or add to the JNLP launch descriptor. You can use any number of nested filesets, jars, nativlibs or extensions. Note, that only files ending with jar, dll, so, or jnlp will be accepted and that resources must be defined inside a jnlp element.

Attribute Description Required
locale Specifies the locale for which this resources element should be used. Optional
os Specicifies for which operation system this resources element should be used. Optional
arch Specifies for which processor architecture this resources element should be used. Optional
Examples
<resources>
  <jar src="lib/venus.jar" />
  <jar src="lib/mars.jar" />
</resources>

<resources>
  <fileset dir="lib">
    <include name="*.jar" />
    <include name="*.jnlp" />
    <include name="*.dll" />
  </fileset>
</resources>

jar

The nested jar element lets you specify jars that you want to update or add to the JNLP launch descriptor. Note, that jar must be defined inside a resources element.

Attribute Description Required
src The jar file to include. Required

nativelib

The nested nativelib element lets you specify native libraries that you want to update or add to the JNLP launch descriptor. Note, that nativelib must be defined inside a resources element. Don't wrap the native library in a jar as this will be automatically done by Venus Application Publisher.

Attribute Description Required
src The native library to include. Required
Examples
<resources os="Linux">
  <nativelib src="lib/mp3.so" />
</resources>

extension

The nested extension element lets you specify extensions that you want to update or add to the JNLP launch descriptor. Note, that extension must be defined inside a resources element.

Attribute Description Required
src The extension to include. Required
Examples
<resources>
  <extension src="lib/javahelp.jnlp" />
</resources>

jarsigner

The optional nested jarsigner element lets you configure the jar signer used by Venus Application Publisher. Note, that jarsigner must be defined inside a vampwar task.

Attribute Description Required
keystore Specifies the keystore file that contains keys and certificates. Note, that the keystore must be specified as a URL even if it is a file. Optional
storetype Specifies the type of keystore. The default on most systems is the Java Keystore type, known as "JKS". If you have the Java Cryptography Extension installed, you may want to use a "JCEKS" keystore instead. Optional
storepass Specifies the password that verifies the integrity of the keystore. Optional
alias Specifies the alias for the private key that is used to sign the jars. Optional
keypass Specifies the password for the private key selected by the alias above. Optional
Examples
<jarsigner
    keystore  = "file:///c:/vamp/sign/venus.keystore
    storetype = "JKS"
    storepass = "mercury"
    alias     = "aphrodite"
    keypass   = "pluto" />

jnlpservlet

The optional nested jnlpservlet element lets you configure Sun's jnlp-servlet that will be added to the relocatable Web Archive. Note, that jnlpservlet must be defined inside a vampwar task.

Attribute Description Required
loglevel Specifies the log level for the jnlp-servlet. There are five different categories to choose from: FATAL, WARNING, INFORMATIONAL, DEBUG and NONE. Optional
logpath Specifies where the jnlp-servlet writes the log output. Optional
Examples
<jnlpservlet
    loglevel="DEBUG"
    logpath="/logs/jnlpdownloadservlet.log" />

VampWar Examples

Assume the following structure in the project's base directory:

venus.jnlp
image/venus.gif
lib/venus.jar
lib/mars.jar
lib/serena.jar
lib/aphrodite.jar

then the web archive venus.war created with

<vampwar dest="venus.war">
  <jnlp src="venus.jnlp">
     <information>
        <icon src="image/venus.gif" />
     </information>
     <resources>
        <fileset dir="lib">
           <include name="*.jar" />
        </fileset>
     </resources>
   </jnlp>
</vampwar>

will consist of

install.html
venus.jnlp
venus.gif
lib/venus.jar
lib/mars.jar
lib/serena.jar
lib/aphrodite.jar
META-INF/MANIFEST.MF
WEB-INF/web.xml
WEB-INF/lib/jaxp.jar
WEB-INF/lib/jnlp-servlet.jar
WEB-INF/lib/parser.jar

If you don't want to include the jnlp-servlet set the jnlpservlet attribute for vampwar to false and your web archive will consist of

install.html
venus.jnlp
venus.gif
lib/venus.jar
lib/mars.jar
lib/serena.jar
lib/aphrodite.jar
META-INF/MANIFEST.MF
WEB-INF/web.xml

VampInstaller

Description

This task creates a CD-Installer in a single Java Archive for easy deployment of Java applications using JavaWebStart. This task requires Venus Application Publisher. The latest version of Venus Application Publisher can be found at http://www.vamphq.com/.

The JNLP launch descricptor is defined by a nested jnlp tag and jar signing can be configured using a nested jarsigner tag. Note, that the nested jnlp tag is required and that jarsigner is optional, see nested elements for details.

Parameters

Attribute Description Required
dest The installer Java Archive (jar-file) to create. Yes

VampInstaller Examples

<vampinstaller dest="installer.jar">
  <jnlp src="venus.jnlp">
     <information>
        <icon src="image/venus.gif" />
     </information>
     <resources>
        <fileset dir="lib">
           <include name="*.jar" />
        </fileset>
     </resources>
   </jnlp>
</vampinstaller>

All the tools to deliver rich, cross-plattform, zero-admin desktop apps built on open standards today
vamphq.com Logo
Send your comments, suggestions or praise to webmistress@vamphq.com Copyright © 2001, 2002 Gerald Bauer