com.typesafe.sbt.packager.archetypes
Members list
Packages
Type members
Classlikes
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 Objecttrait Matchableclass Any
- Known subtypes
-
object autoImportobject Keys
==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
withenablePlugins(JavaAppPackaging)
- Supertypes
-
class AutoPlugintrait PluginsFunctionsclass Basictrait Pluginsclass Objecttrait Matchableclass AnyShow all
- Self type
-
JavaAppPackaging.type
Available settings/tasks for the com.typesafe.sbt.packager.archetypes.JavaServerAppPackaging
Available settings/tasks for the com.typesafe.sbt.packager.archetypes.JavaServerAppPackaging
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object autoImportobject Keys
==Java Server App Packaging==
==Java Server App Packaging==
Provides configuration for running an application on a server.
Attributes
- See also
- Supertypes
-
class AutoPlugintrait PluginsFunctionsclass Basictrait Pluginsclass Objecttrait Matchableclass AnyShow 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 Objecttrait Matchableclass Any
- Self type
-
JavaServerBashScript.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
==Maintainer Script Helper==
==Maintainer Script Helper==
Provides utility methods to configure package maintainerScripts.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object autoImportobject MaintainerScriptHelper
Attributes
- Companion
- trait
- Supertypes
- Self type
This object provides methods to generate scripts from templates. This involves
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
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 Objecttrait Matchableclass Any
- Self type
-
TemplateWriter.type