sbt-native-packager

Send module version as command line argument to SBT

送分小仙女□ 提交于 2019-12-19 04:20:50
问题 I am using TeamCity to run a bash script that is utilizing SBT Native Packager to publish an image to Docker. The sbt portion of the bash script looks something like this: sbt -DdockerRepository=$repo -DpackageName=$packageName -D myproject/docker:publish I want to pass on the TeamCity build number as a version number to my package. Today I specify the version number manually in settings in build.sbt: settings( version := "0.20", ...., dockerBaseImage := "example.com:5000/linux/java8:latest",

How to create predictable logging locations with sbt-native-packager

无人久伴 提交于 2019-12-12 17:16:50
问题 I am using sbt-native-packager with the experimental Java Server archetype. I am trying to identify a conventional way to access my log files, and I'm wondering if anyone knows of a common approach here. Since I am using the Java Server archetype, I am getting a symlink /var/log/$app -> install_dir/$app/log, but it feels a little dirty and less portable to just have log4j open /var/log/$app/error.log directly. [Update] I ended up creating an object with run time path information: object

Publish to bintray a zip file with sbt-native-packager

混江龙づ霸主 提交于 2019-12-11 12:37:47
问题 I want to publish a zip file to bintray using the sbt-native-launcher. I am able to execute: sbt publish and it publishes the main artifacts (.jar, javadocs, and so on). I am also able to execute: sbt universal:packageBin and it generates the .zip file. However, when I execute: sbt universal:publish it gives the following error: [info] Wrote C:\src\ShExcala\target\scala-2.10\shexcala_2.10-0.0.1.pom tar: Cannot execute remote shell: No such file or directory tar: C\:\\Users\\Labra\\AppData\

How to create a basic project setup using sbt-native-packager

回眸只為那壹抹淺笑 提交于 2019-12-11 02:47:17
问题 I have a project setup working with SBT to the point of creating sub-project artifacts. I have been searching for a way to create a JAR file that contains sub-project JAR files along with some meta information. Based on suggestions, I looked at sbt-native-packager and it seems to have the capabilities I need. I am wondering if someone would be willing to help me along this path by providing tips on creating a skeleton package specification for the plugin. I think my configuration is pretty

Scala SBT - sbt-native-packager, how to specify custom stage directory

*爱你&永不变心* 提交于 2019-12-11 02:23:50
问题 How can I specify custom staging directory for multi-project configuration? I'm using sbt-native-packager Below is the sketch of my multi module configuration. When I stage this project ( sbt stage ) the files are written to common/target/universal/stage app1/target/universal/stage app2/target/universal/stage I wan to pass an env variable stageSuffix like this: sbt stage -DstageSuffix=XYZ . This variable should make it stage the project to the following directories: common/target/universal

How should we address local dependencies in sbt files for Spark

坚强是说给别人听的谎言 提交于 2019-12-10 19:36:06
问题 I have this sbt file: offline := true name := "hello" version := "1.0" scalaVersion := "2.11.7-local" scalaHome := Some(file("/home/ubuntu/software/scala-2.11.7")) libraryDependencies += "org.apache.spark" %% "spark-core" % "1.5.0" % "provided" How can I tell it to use this address for Spark rather than using web? /home/ubuntu/software/spark-1.5.0-bin-hadoop2.6 Because it just tries to connect to internet for Spark dependencies and my VM doesn't have internet access due to security issues. I

SBT: Override setting in multi-build dependsOn/aggregate project

我的未来我决定 提交于 2019-12-10 17:10:47
问题 How do I override a sub-project setting/task in a multi-build SBT project? For example, here are two very simple SBT projects: ~/projects/backend/build.sbt name := "backend" // old version of scala scalaVersion := "2.9.1" ~/mycode/docker_builder/build.sbt lazy val backend = RootProject(file("~/projects/backend")) lazy val root = (project in file(".")). settings( // Doesn't work because sub-project already defines name name in backend := "sub-overriden", // Doesn't override {backend/}backend/*

Add specific directory and its content to Universal target

廉价感情. 提交于 2019-12-08 17:05:40
问题 I am switching from maven to sbt for a Scala project I am working on. I used to work with the maven assembly plugin where you can map any directory in the workspace to a target directory in the assembly. I didn't find any equivalent in sbt-native-package, it worth provide this feature for the Universe kind. I understood that everything that is present in the universal subdirectory is copied to the package as such, and it works like a charm, but I lack something like the following snippet.

Use cases for different sbt Key operators

依然范特西╮ 提交于 2019-12-03 08:50:28
问题 The documentation for sbt seems to be really lacking here, so I'd like to get a definitive answer on this: what is the difference between "+=", "++=", "<+=", "<++=", and "<<=" when operating on Keys? 回答1: You cannot find documentation, because as @JacekLaskowski correctly pointed out all operators except for += , ++= and := are deprecated. You can however find the Documentation if you switch to older version of sbt. If you however are stuck to older version, this is their meaning (via

How to disable ScalaDoc generation in dist task in Play 2.2.x (using project/build.scala)?

懵懂的女人 提交于 2019-11-30 10:56:56
问题 Adding the following settings to the build.sbt file of a Play 2.2.x app does not disable Scaladoc generation. How can it be disabled? play.Project(appName, appVersion, appDependencies) .settings(scalaVersion := "2.10.3") .settings(jsSettings : _*) .settings( publishArtifact in (Compile, packageDoc) := false, publishArtifact in packageDoc := false ) 回答1: Add the following settings to the Play project: sources in (Compile,doc) := Seq.empty publishArtifact in (Compile, packageDoc) := false With