Giter Club home page Giter Club logo

ant-webstart's Introduction

Ant Webstart task

Ant task to generate a deployment structure for a webstart enabled application.

An example:

<project xmlns:p="antlib:de.perdian.ant.webstart">
  ...
  <target name="create-webstart">
    <taskdef uri="antlib:de.perdian.ant.webstart" classpath="/path/to/webstart.jar" />
    <p:jnlp destfile="${build.target.directory}/webstart/test.jnlp">
      <information>
        <title>aTitle</title>
        <vendor>aVendor</vendor>
        <offlineallowed />
        <description>Short Description</description>
      </information>
      <resources>
        <path>
          <fileset dir="${build.target.directory}/webstart/libs/">
          </fileset>
        </path>
      </resources>
      <security>
        <allpermissions />
      </security>
      <applicationdesc mainclass="de.perdian.google.api.apps.impl.driveclient.DriveClientLauncher" />
    </p:jnlp>
  </target>
  ...
</project>

All in all, the declaration of the target JNLP file in the Ant task ist almost identical to the actual JNLP file, as it is defined in the specification (http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/developersguide/syntax.html). The main exception being, that wherever slashes in the specification are allowed, (for example within the offline-allowed element, there are no slashed allowed for the ant task (which means the tag is to be added as offlineallowed).

Additionally, to all the standard JNLP elements, the resources elements supports adding a path child, as described in the example above. The existence of such a child means, that the task will analyze the contents of the path and will add a jar child element to the resources parent element for each of the entries found in the path. This allows for a dynamic way to add required resources, without actually having to declare them over and over again. The path's to the resource files (usually JARs) will be relative to the location of the JNLP file itself (as defined in the destfile attribute of the main task element).

Requirements

The ant-webstart tasks requires Java SE 6 or higher.

Build

If you want to build the application yourself, all you have to do once you've cloned the Git repository is to call the Ant buildscript:

cd /whereever/your/project/is
ant distribute-lib

Please note, that since the project uses Apache Ivy as dependency management system, your Ant installation must also have the Apache Ivy JAR-File in it's classpath. For further information about Apache Ivy see: https://ant.apache.org/ivy/history/latest-milestone/install.html

Once the build is completed, the JAR file containing the tasks can be found in the distribution/lib subdirectory.

ant-webstart's People

Contributors

perdian avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

nitroamos

ant-webstart's Issues

All Permissions Tag

Hi,

First of all thanks for such nice ant task, it really helps to create jnlp file.

I am trying to use security/all-permisions tag, but i couldnt.

Altough there is a method for creating all-permisions tag, its never been called.

de.perdian.ant.webstart.elements.SecurityElement.createAllpermissions()

Thanks

A few small bugs

  1. The antlib.xml file in your resource folder isn't included in your pre-packaged jar. It's impossible to use your library without manually pulling the source and repackaging it.
  2. AppletDescElement's myParam variable isn't instantiated. If you try to set a Param entity, it'll throw a NPE.

ShortcutElement.appendXml

de.perdian.ant.webstart.elements.ShortcutElement[33]

- ConfigurationHelper.appendAttributeIfNotNull(shortcutElement, "install", this.getOnline());
+ ConfigurationHelper.appendAttributeIfNotNull(shortcutElement, "install", this.getInstall());

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.