Skip to content

ritschwumm/xsbt-scriptstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A startscript plugin for sbt

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

Get and install this plugin before building:
    https://github.com/ritschwumm/xsbt-classpath

Build and publish the plugin:
    git clone git@github.com:ritschwumm/xsbt-scriptstart.git
    cd xsbt-scriptstart
    sbt publish-local

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

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

    scriptstartConfigs  := Seq(ScriptConfig(
        scriptName  = "my",
        vmOptions	= Seq("-Xmx192m"),
        mainClass   = "my.Main"
    ))

Run the scriptstart task to get a directory containing all dependencies of
your project together with startscripts for linux, os x, windows and os/2.

To create a zip file from the application, you can use the xsbt-zipper plugin:

    // scriptstart::zipper
    inTask(scriptstartBuild)(zipperSettings ++ Seq(
        zipperFiles := selectSubpaths(scriptstartBuild.value, -DirectoryFilter).toSeq
    ))