Questions tagged [sbt-native-packager]

The sbt Native Packager is designed to package software built with the sbt build system into native packaging systems such as msi, deb, rpm, etc.

The sbt Native Packager is designed to bundle software built with the sbt build system into native packaging systems such as msi, deb, rpm, etc.

More information:

The git hub page for the software can be found here

360 questions
4
votes
2 answers

Can not reach HTTP servlet when built as Dockercontainer

Hello and thanks for taking time :) Currently I am facing some Problems with sbt-native-packager and Docker. I'm relatively new to this. Actually, its my first try. And here comes my problem: I've got an Actor, that should respond to HTTP requests.…
4
votes
1 answer

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

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(".")). …
lorilan
  • 311
  • 1
  • 9
4
votes
2 answers

sbt native packager: cannot locate resource when executable is run

I am working on an application that uses sbt-native-packager with the akka_application archetype. I have a directory structure that looks like: src/ main/ resources/ application.conf somePrivateKey.p12 Within my code, I have a…
Travis Kaufman
  • 2,867
  • 22
  • 23
4
votes
1 answer

sbt-native-packager cannot import NativePackagerKeys._ into Build.scala

The title says it all. I'm sure this is something small, but I've been on this for a few hours and can't get it licked. SBT 13.7 sbt-native-packager 1.0.0-M1 Using AutoPlugins scala 2.10.4 using Build.scala using an sbt script to standardize My…
penland365
  • 525
  • 4
  • 13
4
votes
2 answers

Skip scaladoc when running 'dist' on a Play project

How can I stop scaladoc from running when executing 'dist' on a Play project (currently using Play 2.3.0)? As an example: $ git clone --branch play-2.3.0 git@github.com:guardian/gu-who.git $ cd gu-who $ sbt clean dist [info] Loading project…
Roberto Tyley
  • 24,513
  • 11
  • 72
  • 101
4
votes
1 answer

Choose which mainClass to use with sbt-native-packager

I'm using sbt-native-packager 0.7.0-RC3 to package some of my application and many times I need to package with another mainClass. When in dev mod i use this : mainClass in (Compile, run) := Some("package.blabla.Dev") And when packaging i want to…
Artix
  • 43
  • 4
4
votes
2 answers

Excluding unmanaged dependencies from universal:packageBin in sbt-native-packager?

I have an external lib directory with jars. I need these included in my classpath in order to compile and test my project but I do not want to include them in the distributed zip file that is generated via universal:packageBin (in the…
ishaaq
  • 6,329
  • 3
  • 16
  • 28
4
votes
1 answer

Adding /etc/ to the classpath in sbt-native-packager for debian:package-bin

So I'm using the packageArchetype.java_server and setup my mappings so the files from "src/main/resources" go into my "/etc/" folder in the debian package. I'm using "sbt debian:package-bin" to create the package The trouble is when I use "sbt run"…
djsumdog
  • 2,560
  • 1
  • 29
  • 55
4
votes
1 answer

daemonUser for upstart not working in sbt-native-packager

I'm using the sbt-native-packager to create a .deb package including all libraries. The generated upstart-script is using the root user which I obviously want to avoid. I found a hint in the code that there is a daemonUser sbt-setting defined but i…
magegu
  • 530
  • 4
  • 18
3
votes
1 answer

Using sbt-native-packager to instrument prometheus exporter via JavaServerAppPackaging

I am trying to instrument a java app with prometheus exporter using sbt-native-packager: This is what I have: plugin.sbt addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.5.1") build.sbt import…
irrelevantUser
  • 1,172
  • 18
  • 35
3
votes
0 answers

sbt-native-packager: How can I split a fat jar into dependencies and code for Docker Layer Optimization?

Is there a way in sbt-native-packager to split a fat jar into multiple jars? Ideally one for the dependencies, another for assets, and a third for the code? I am trying to optimize docker layering by splitting the seldom changed assets and…
Chris Marsh
  • 67
  • 1
  • 8
3
votes
1 answer

How to attach a PostgreSQL volume to a Docker image generated with SBT native packager?

I would like to be able to deploy my app in a pre-prod environment for integration testing using a Docker volume that will expose an instance of PostgreSQL. I'm using Scala v2.12.8 and Play v2.7. Looking at the environment settings of the SBT…
sentenza
  • 1,608
  • 3
  • 29
  • 51
3
votes
1 answer

java.lang.RuntimeException: You must run the `stage` task before deploying your app when running `sbt stage deployHeroku`

I am trying to deploy my application to Heroku using sbt-nativepackager and sbt-heroku. My code is available at https://github.com/hhimanshu/sbt101/tree/m5 (branch is m5) When I run sbt stage deployHeroku, the application fails as below ➜ sbt101…
daydreamer
  • 87,243
  • 191
  • 450
  • 722
3
votes
2 answers

Can I provide AWS credentials via mounted directory to local Docker container built by sbt-native-packager

We have some docker images we build with sbt-native-packager that need to interact with AWS services. When running them outside of AWS, we need to explicitly provide credentials. I know we can explicitly pass environment variables containing the…
James Matlik
  • 185
  • 2
  • 8
3
votes
1 answer

how to package and reference text file in resources folder

I have a spark project using scala and sbt. At one point it references a text file which I want to be packaged. This is how it is referenced in the application source: getClass.getResource("/myFile.txt") This works fine running the source code with…
Jonny Cundall
  • 2,552
  • 1
  • 21
  • 33