Packages

package archetypes

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. trait JavaAppKeys extends AnyRef

    Available settings/tasks for the com.typesafe.sbt.packager.archetypes.JavaAppPackaging and all depending archetypes.

  2. trait JavaServerAppKeys extends AnyRef

    Available settings/tasks for the com.typesafe.sbt.packager.archetypes.JavaServerAppPackaging

  3. trait MaintainerScriptHelper extends AnyRef

    Provides utility methods to configure package maintainerScripts.

    Maintainer Script Helper

    Provides utility methods to configure package maintainerScripts.

Value Members

  1. object JavaAppPackaging extends AutoPlugin

    This class contains the default settings for creating and deploying an archetypical Java application.

    Java Application

    This class contains the default settings for creating and deploying an archetypical Java application. A Java application archetype is defined as a project that has a main method and is run by placing all of its JAR files on the classpath and calling that main method.

    Configuration

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

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

      enablePlugins(JavaAppPackaging)
  2. object JavaServerAppPackaging extends AutoPlugin

    Provides configuration for running an application on a server.

    Java Server App Packaging

    Provides configuration for running an application on a server.

    See also

    http://sbt-native-packager.readthedocs.io/en/latest/archetypes/java_server/index.html

  3. object JavaServerBashScript

    Loads scripts from the resource path that are associated with

    Loads scripts from the resource path that are associated with

    • an archetype
    • a sbt.Configuration
    Example:
    1. val scriptName: String = "postrm"
      val archetype: String = "java_server"
      val config: Configuration = SbtNativePackager.Debian
      val replacements: Seq[(String,String)] = linuxScriptReplacements.value
      val template: Option[URL] = None // user defined override
      
      val scriptContent = JavaServerBashScript(scriptName, archetype, config, replacements, template) getOrElse {
          sys.error(s"Couldn't load [scriptName] for config [{config.name}] in archetype [archetype]")
      }
      IO.write(scriptFile, scriptContent)
    See also

    com.typesafe.sbt.packager.archetypes.JavaServerAppPackaging

  4. object JavaServerLoaderScript
  5. object MaintainerScriptHelper extends MaintainerScriptHelper
  6. object TemplateWriter

    This object provides methods to generate scripts from templates.

    This object provides methods to generate scripts from templates. This involves

    • procesing - replacing a placeholders with actual values
    • TODO: validating - check the script if there are no remaining placeholders
    Examples:
    1. a bash script can be generated like this

      val template = getClass getResource "template-your-bashscript"
      val replacements = Seq("name" -> "your-app", "custom" -> "1")
      TemplateWriter.generateScript(template, replacements)
    2. ,
    3. a bat script can be generated like this

      val template = getClass getResource "template-your-batscript"
      val replacements = Seq("name" -> "your-app", "custom" -> "1")
      TemplateWriter.generateScript(template, replacements, "\r\n", TemplateWriter.batFriendlyKeySurround)

      TODO move out of archetypes package

Ungrouped