Packages

  • package root
    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package typesafe
    Definition Classes
    com
  • package sbt
    Definition Classes
    typesafe
  • package packager
    Definition Classes
    sbt
  • package archetypes
    Definition Classes
    packager
  • package scripts
    Definition Classes
    archetypes
  • object AshScriptPlugin extends AutoPlugin

    This class is an alternate to JavaAppPackaging designed to support the ash shell.

    Java Application

    This class is an alternate to JavaAppPackaging designed to support the ash shell. JavaAppPackaging generates bash-specific code that is not compatible with ash, a very stripped-down, lightweight shell used by popular micro base Docker images like BusyBox. The AshScriptPlugin will generate simple ash-compatible output.

    Just like with JavaAppPackaging you can override the bash-template file by creating a src/templates directory and adding your own bash-template file. Actually this isn't a bad idea as the default bash-template file inherited from JavaAppPackaging has a lot of stuff you probably don't want/need in a highly-constrained environment like ash+BusyBox. Something much simpler will do, for example:

    #!/usr/bin/env sh

    realpath () { ( TARGET_FILE="$1"

    cd "$(dirname "$TARGET_FILE")" TARGET_FILE=$(basename "$TARGET_FILE")

    COUNT=0 while [ -L "$TARGET_FILE" -a $COUNT -lt 100 ] do TARGET_FILE=$(readlink "$TARGET_FILE") cd "$(dirname "$TARGET_FILE")" TARGET_FILE=$(basename "$TARGET_FILE") COUNT=$(($COUNT + 1)) done

    if [ "$TARGET_FILE" == "." -o "$TARGET_FILE" == ".." ]; then cd "$TARGET_FILE" TARGET_FILEPATH= else TARGET_FILEPATH=/$TARGET_FILE fi

    echo "$(pwd -P)/$TARGET_FILE" ) }

    real_script_path="$(realpath "$0")" app_home="$(realpath "$(dirname "$real_script_path")")" lib_dir="$(realpath "${app_home}/../lib")"

    ${{template_declares}}

    java -classpath $app_classpath $app_mainclass $@

    Configuration

    This plugin adds new settings to configure your packaged application. The keys are defined in com.typesafe.sbt.packager.archetypes.JavaAppKeys

    Definition Classes
    scripts
    Example:
    1. Enable this plugin in your build.sbt with

      enablePlugins(AshScriptPlugin)
  • Defines

object Defines

Ash defines

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Defines
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply(appClasspath: Seq[String], configFile: Option[String], bundledJvm: Option[String]): Seq[String]

    Creates the block of defines for a script.

    Creates the block of defines for a script.

    appClasspath

    A sequence of relative-locations (to the lib/ folder) of jars to include on the classpath.

    configFile

    An (optional) filename from which the script will read arguments.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Deprecated Value Members

  1. def apply(appClasspath: Seq[String], configFile: Option[String]): Seq[String]
    Annotations
    @deprecated
    Deprecated

    (Since version ) 1.3.21

Inherited from AnyRef

Inherited from Any

Ungrouped