sbt-native-packager

Publish zip created by sbt-native-packager

自闭症网瘾萝莉.ら 提交于 2020-01-22 14:37:40
问题 I am trying to publish to a repository the zip file generated by the sbt-native-packager plugin through universal:packageBin task. I configured my project like this: publishTo := Some("Repo" at "http://repo") publishMavenStyle := true packagerSettings packageArchetype.java_application I am struggling trying to create a new sbt task (named publishZip) using publish task and packageBin task to publish the zip file. How can I achieve this ? 回答1: Add the following line to your sbt build (around

Cross platform build with SBT

我的未来我决定 提交于 2020-01-10 04:21:07
问题 I'm currently testing out SBT Native Packager and my desired result is to have a native installer for each supported platform. Obviously to do this the platform specific SBT tasks will need to run on that platform. The build will either be done with Atlassian's Bamboo or JetBrains' Team City. Ideally I would only do the compilation and tests once and reuse the same artifacts for the packaging tasks. What is a good way to approach this with SBT? One way I can think of is to do the compile and

akka-http not showing metrics in NewRelic

我只是一个虾纸丫 提交于 2020-01-07 01:49:29
问题 I'm trying to monitor my akka-http Rest web-service with NewRelic The application has only one GET url (defined with akka-http) I have the following configuration in the plugins.sbt logLevel := Level.Warn addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.4") addSbtPlugin("com.gilt.sbt" % "sbt-newrelic" % "0.1.4") I have the following configuration in the build.sbt scalaVersion := "2.11.7" name := "recommender-api" ...blablabla... libraryDependencies += "com.typesafe.akka" % "akka

How do I create a tarball and a zip for a single module using distinct configurations?

半城伤御伤魂 提交于 2020-01-06 02:44:10
问题 I have a multi-project build with a particularly messy module which contain several mainClasses. I would like to create several distribution packages for this messy module, each distribution package employing distinct file sets and employing different formats. Ideas? 回答1: This is the answer from the sbt-nativer-packager issue tracker where the same question was posted. I'm adding this from the gitter chat as well: I'm just arriving in this chat room and my knowledge of sbt-native-packager is

What is the recommended way to set JVM options for the executables created with sbt-native-packager?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-03 02:36:04
问题 Currently, I use export JAVA_OPTS ... on the command line, but there seem to be other possibilities, using the build.sbt or an external property file. I have found several relevant github issues here, here and here but the many options are confusing. Is there a recommended approach? 回答1: The approach you take to setting JVM options depends mainly on your use case: Inject options every time If you want to be able to specify the options every time you run your service, the two mechanisms are

SBT using sbt-native-packager how to create different build files?

好久不见. 提交于 2019-12-25 14:01:23
问题 I have a Play 2.3 Application, following the docs I can build a debian package, the problem comes when I want to build things like this: I have different configurations for dev, qa and prod , and I want to build to 4 different packages, one that contains the code and the others that contains the configuration. so I will get this 4 packages: app-version.deb [this contains the code] app-config-dev-version.deb [this contains the dev configuration] app-config-qa-version.deb [this contains the qa

Building paths in SBT for the packageMappings of the sbt-native-packager

纵然是瞬间 提交于 2019-12-24 17:46:23
问题 I am very new to SBT and need to create a RPM package for one of my project. The RPM contains only 1 file, which is a one-jar created by the sbt-onejar plugin). I want to use sbt-native-packager plugin and have created a Packagin.scala file under the /project directory like this: object Packaging { val settings: Seq[Setting[_]] = packagerSettings ++ deploymentSettings ++ mapGenericFilesToLinux ++ Seq( maintainer := "Team", packageSummary := "Summary", packageDescription := """Description""",

Play dist task: how to prevent conf files to be packed

ぐ巨炮叔叔 提交于 2019-12-24 16:13:06
问题 When running dist task, distribution package includes conf files (from <app>/conf ) in two places: <app.zip>/conf <app.zip>/lib/<app.jar> This means that application.conf (and all the other conf files whithin <app>/conf ) will be placed both in the root of the zip package, and in the root of the main jar library. When running the application, files inside jar are the ones used, so copies in the <unzipped-app>/conf are completely ignored. I'm wondering which is the best practice here: I think

How do I change universal zip file name using sbt-native-packager

*爱你&永不变心* 提交于 2019-12-23 12:08:44
问题 I am using: scala 2.10.3 sbt 13.2 with plugin: addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "0.7.3") I am using the universal:packgeBin to generate the universal zip file and publish to ivy repository. I'd like to change the zip file name from project_id_scalaversion_buildVersion.zip to project_id_scalaversion_buildVersion_dist.zip . How would I do that? 回答1: This answer is based on version 1.0.3 that I have used, but it should apply to the latest version (1.1.5) as well. You can

How to setup sbt-native-packager in a single module project with multiple mains

杀马特。学长 韩版系。学妹 提交于 2019-12-23 11:57:07
问题 I have a single module client-server project with a main for each. I'm trying to use sbt-native-packager to generate start-script for both. project/P.scala object Tactic extends Build { lazy val root = (project in file(".")). configs(Client, Server) .settings( inConfig(Client)(Defaults.configTasks) : _*) .settings( inConfig(Server)(Defaults.configTasks) : _*) lazy val Client = config("client") extend Compile lazy val Server = config("server") extend Compile } build.sbt mainClass in Client :=