Giter VIP home page Giter VIP logo

xsbt-webstart's Introduction

A Webstart plugin for sbt

At the moment, this is only a rough draft, just enough to get my own
projects running. Let me know what you think.

To build this code, get and install SBT from
    https://github.com/sbt/sbt

Get and install these plugins before building:
    https://github.com/ritschwumm/xsbt-util
    https://github.com/ritschwumm/xsbt-classpath

Build and publish the plugin:
    git clone [email protected]:ritschwumm/xsbt-webstart.git
    cd xsbt-webstart
    sbt publish-local

Add the plugin to your project in project/plugins.sbt:
    addSbtPlugin("de.djini" % "xsbt-webstart" % <version>)

Include the plugin in your project's build.sbt:

    webstartGenConfig := Some(GenConfig(
        dname       = "CN=Snake Oil, OU=An Anonymous Hacker, O=Bad Guys Inc., L=Bielefeld, ST=33641, C=DE",
        validity    = 365
    ))

    webstartKeyConfig := Some(KeyConfig(
        keyStore    = file("my/keyStore"),
        storePass   = "password",
        alias       = "alias",
        keyPass     = "password"
    ))

    webstartJnlpConfigs    := Seq(JnlpConfig(
        fileName    = "my.jnlp",
        descriptor  = (fileName:String, assets:Seq[JnlpAsset]) => {
            <jnlp spec="6.0+" codebase="$$codebase" href={fileName}>
                <information>
                    <title>My Title</title>
                    <vendor>My Company</vendor>
                    <description>My Webstart Project</description>
                    <icon href="my_icon.png"/>
                    <icon href="my_splash.png" kind="splash"/>
                </information>
                <security>
                    <all-permissions/>
                </security>
                <resources>
                    <j2se version="1.7+" max-heap-size="192m"/>
                    { assets map { _.toElem } }
                </resources>
                <application-desc main-class="my.Main"/>
            </jnlp>
        }
    ))

    /*
    on osx this file must contain the line
    Permissions: all-permissions
    or the java security settings cannot be set to "very high"
    */
    webstartManifest    := Some(file("path/to/MANIFEST.MF"))

Once set up you can use the following tasks in sbt:

    webstart        creates a directory with a JNLP file and all necessary jar files
    webstart-keygen creates a keyStore, fails if it already exists

xsbt-webstart's People

Watchers

 avatar  avatar  avatar

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.