com.typesafe.sbt.packager.archetypes

Members list

Type members

Classlikes

trait JavaAppKeys

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

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

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object autoImport
object Keys
object JavaAppPackaging extends AutoPlugin

==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

Attributes

Example

Enable this plugin in your build.sbt with

enablePlugins(JavaAppPackaging)
Supertypes
class AutoPlugin
trait PluginsFunctions
class Basic
trait Plugins
class Object
trait Matchable
class Any
Show all
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object autoImport
object Keys
object JavaServerAppPackaging extends AutoPlugin

==Java Server App Packaging==

==Java Server App Packaging==

Provides configuration for running an application on a server.

Attributes

See also
Supertypes
class AutoPlugin
trait PluginsFunctions
class Basic
trait Plugins
class Object
trait Matchable
class Any
Show all
Self type

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

Attributes

See also
Example
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)
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

==Maintainer Script Helper==

==Maintainer Script Helper==

Provides utility methods to configure package maintainerScripts.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

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

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

  1. procesing - replacing a placeholders with actual values
  2. TODO: validating - check the script if there are no remaining placeholders

Attributes

Example

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)

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

Supertypes
class Object
trait Matchable
class Any
Self type