Questions tagged [sbt]

1

votes
0

answer
44

Views

Scala.JS: How to enforce fastOptJS - when running tests

When I run my server tests it always runs a full optimization on the client module. (server/test) I tried different things to enforce to use only fast optimization, without success. Even scalaJSStage in Global := FastOptStage did not help. Is there a way to achieve that? I use scalatestfor testing....
pme
1

votes
1

answer
981

Views

IntelliJ: Cannot open SBT Project: jansi 1.11 error

Having very recently started working with Big Data, I'm looking to learn more about Spark and Scala to learn to work with many files and hdfs. While experimenting with IntelliJ (which was recommended to me), I installed the most recent update of IntelliJ along with an installation of SBT as well as...
Foxlooo
1

votes
0

answer
32

Views

Shaded Akka Conflict with Apache Toree

I have an uber-jar with an Akka dependency that I am trying to use with Spark on Apache Toree (added through spark-defaults.conf by setting spark.jars to /home/cdsw/uber.jar). Toree has its own internal version of Akka, which is different from the uber-jar's (uber-jar = 2.5.11, Toree = 2.3.4). In or...
mongolol
1

votes
0

answer
45

Views

sbt checkPgpSignatures

I installed addSbtPlugin('com.jsuereth' % 'sbt-pgp' % '1.1.0') in project/plugins.sbt but when I execute sbt checkPgpSignatures I get the following error: [error] (updatePgpSignatures) java.lang.IllegalArgumentException: Cannot add artifact 'ciris-test_2.12.pom' to configuration 'pom' of module defa...
Sebastian
1

votes
0

answer
31

Views

Building a recursive dependent filename parser in SBT

I'm trying to do something that seems conceptually pretty straightforward, to build a Parser[File] for an input task that accepts the name of an existing directory. The parser would constructed from a base directory (it would be the user's home directory by default), it would tab-complete over subdi...
Steve Waldman
1

votes
1

answer
26

Views

Can't find javac Error while Deploying Play Application

So this question has been asked before, but following everything, setting the path and moving it to the top, and everything else I can't get it to work. Here's the full error https://hastebin.com/qezelugaba.rb In summary, for some reason SBT thinks that javac is located within the project's working...
1

votes
0

answer
90

Views

Can I use powermock in my sbt project?

I'm using sbt.version=1.1.5. I wanna use powermock for mocking the static method. my build.sbt ... scalaVersion := '2.11.7' libraryDependencies ++= Seq( ... 'org.mockito' % 'mockito-core' % '2.18.3' % 'test', 'org.powermock' % 'powermock-api-mockito' % '1.7.4' % 'test', 'org.powermock' % 'powermock-...
syuhei
1

votes
1

answer
76

Views

Sbt task evaluated only once

def updateSnap = Command.command('updateSnap') { state => import scala.concurrent.duration._ val extracted = Project.extract(state) import extracted._ runTask( update, appendWithSession(Seq(coursierTtl := None), state) ) state } I defined a command that run update with coursierTtl := None And it wor...
jilen
1

votes
0

answer
128

Views

deploying play framework on Amazon EC2 using `sbt dist`

I am trying to deploy my play framework 2.6.x to the amazon EC2 instance. I have made a zip successfully using sbt dist command. I have then copied the zip file to /opt/{project-name}/ folder and unziped it there. I then tried running the application as a daemon with the following parameters and few...
Swapnil B.
1

votes
1

answer
30

Views

sbt issues with my ClassBuilder implementation (Scala)

What is Intellij doing for me that sbt isn't? I am working on a Scala project for which I'd like to support user-defined plugin classes. I've implemented a subclass of ClassLoader: class PluginLoader(directory: String) extends ClassLoader { override def findClass(className: String): Class[_] = { val...
1

votes
0

answer
59

Views

How to dry-run scalatest?

I marked test that took extremely long time to check with a special tag. I tried add tag to the ignored list, but scalacheck runs it regardless. So I'd like to list all tests with specific tag or make a dry-run to see if tag exclusion option (-l) has any effect. How should I do it?
ayvango
1

votes
1

answer
437

Views

sbt Could not find launcher jar: ./bin/sbt-launch.jar

I have been using sbt successfully for basic Scala compiling for several years, but the other day it just quit working for some reason. I was using it in my own account, but I decided to have my sysadmin install the latest version on our local network. When I try to run it, I get Could not find laun...
Russ P.
1

votes
0

answer
789

Views

Error: not found: value SparkSession

I just followed the getting started page of Spark and tried to run the simpleApp. My Spark version : 2.3 Scala version in REPL: 2.11.8 This is the build.sbt file: name := 'Simple Project' version := '1.0' scalaVersion := '2.11.8' libraryDependencies += 'org.apache.spark' %% 'spark-sql' % '2.3.0' Wh...
Sam
1

votes
2

answer
119

Views

Ignore projects when creating ensime config

I am trying to create the ensime configuration file on a Lagom 1.4.4 project, using the ensime-sbt plugin. However, when running the ensimeConfig command on the root of my project, I get this error: > ensimeConfig [info] ENSIME update. [info] Resolving com.lightbend.lagom#lagom-reloadable-server_2.1...
1

votes
0

answer
122

Views

Long PathClass (input line too large)

I'm trying to execute a .bat file using CMD on windows. the command: D:\Candidate_Retrieval\target\universal\candidate-retrieval-1.0\bin> candidate-retrieval The error was: The input line is too long. The syntax of the command is incorrect. I opened the .bat file and I found the classpath as follow...
Seif Gamal
1

votes
1

answer
903

Views

sbt run error: java.lang.RuntimeException: Nonzero exit code: 1

I'm writing a spark scala application with SBT and when I simply run it as scala application, it shows the output. When I do sbt package it downloads all dependencies and shows success. When I do sbt run, it throws error: [info] Running main.scala.com.sntz.omega.Test Using Spark's default log4j pro...
arcticOak2
1

votes
1

answer
93

Views

SBT[1.1.1] Different libraryDependencies for different Scala Versions

I have tried the solution from: SBT cross building - choosing a different library version for different scala version however this results in build.sbt:27: error: No implicit for Append.Value[Seq[sbt.librarymanagement.ModuleID], sbt.Def.Initialize[sbt.librarymanagement.ModuleID]] found, so sbt.Def.I...
Pieter van Lill
1

votes
0

answer
46

Views

Is there a version of Scala with only syntax (no Predef etc)

This question is one of interest. I don't have a specific problem to solve. Scala defines a lot of what naively appears to be syntax via flexible language constructs. For example, List is not a built-in, the arrows in Map('1' -> 1, '2' -> 2) are defined using an implicit conversion of Any to a class...
Joel Berkeley
1

votes
0

answer
166

Views

Scala Worksheet IntelliJ — Internal Error

I'm having issues with getting Scala Worksheets to work in IntelliJ. I've already reinstalled JDK 8 and installed the latest SBT version. The setting in IntelliJ seem fine to me, but I might missed something. Anyone knows how to resolve these issues? Internal error: Could not initialize class com.su...
Hespen
1

votes
0

answer
269

Views

Unable to resolve dependencies in SBT

I want to create a RESTful Web service with Scala so I recovered a project but when I try to execute the sbt command to run the application, I got an error message and I don't understand why. [error] sbt.librarymanagement.ResolveException: unresolved dependency: com.github.mpeltonen#sbt-idea;1.5.0-S...
F.M
1

votes
1

answer
54

Views

SBT Basic Auth Problems

I'm setting up SBT on our buildserver (bamboo) for multiple buildagents. For this I created for each agent a separate directory which contains the agent specific config and the .ivy home to make sure agent isolation is fullfilled. The build itself is call like this: /sbt-launcher-packaging-0.13.13/b...
tli
1

votes
0

answer
470

Views

Embedded Kafka tests (ran by SBT) intermittently fails with ZooKeeperServer errors

I'm writing a group of tests using the spring KafkaEmbedded test util. The tests each individually stand up an embedded kafka instance, produce events and assert the resultant downstream events. The tests consistently pass when run in an IDE (e.g. IntelliJ), however the tests fail intermittently (ap...
Freestyle076
1

votes
1

answer
37

Views

Error while importing a sbt multiproject into intellij

I came across a necessity to re-organize code on which I have been working for some time into a sbt multiproject. I have consulted two sources as examples: A sbt 1.* example (used as base) by Pol Bassiner: sbt 1.* multiproject example A sbt < 1.* example (mostly for .scala files in /project) by Aaro...
vasigorc
1

votes
1

answer
152

Views

SBT project compilation issues

I am trying to compile my previously running project, but somehow am getting a file not found exception. java.io.FileNotFoundException: C:\Apps\SampleProject\project\target\config-classes\$b1d9fdc681faae2e80f2.cache (The system cannot find the file specified) at java.io.FileInputStream.open0(Native...
1

votes
1

answer
149

Views

Run multiple main classes in one sbt run

When I do sbt run for multiple classes with main I get an option which main class to run such as: [1] SparkJob1 [2] SparkJob2 [3] SparkJob3 [4] SparkJob4 [5] SparkJob5 When I select one it works fine, but I would like to run all the classes together in parallel. Is there a way to so, please help me...
Anonymous
1

votes
1

answer
111

Views

error: object sbtassembly is not a member of package <root>

I have build.sbt file as below ` import _root_.sbt.Keys._ import _root_.sbt.Keys._ import _root_.sbtassembly.Plugin.AssemblyKeys._ import sbtassembly.Plugin.AssemblyKeys import AssemblyKeys._ ` while building the project i am getting below error error: object sbtassembly is not a member of package...
Bharath Kumar
1

votes
1

answer
90

Views

How to access library dependencies at build-time in SBT/Scala build?

For example, suppose I have a file project/CodeGeneration.scala that generates 'managed' source-code, and suppose that object (CodeGeneration) needs to leverage a third-party library -- say jsoup... import org.jsoup._ object CodeGeneration { def generateCode = /* Generate code using jsoup... */ } Si...
Chris W.
1

votes
0

answer
51

Views

sbt-native-packager: Set systemd service file to non config

I have sbt-native-packager 1.3.6 and generate rpm packet. In spec file i see: %config(noreplace) %attr(0644,root,root) /usr/lib/systemd/system/my-app.service Is there some trick to make it non config?
1

votes
0

answer
12

Views

Can a resource directory be mapped to an alternate location in the jar with SBT?

Is it possible to include a resource directory, such that it's path is prefixed when added to the jar created by sbt package (v1.1.6)? For context, the mapping I wish to achieve is: ./src/main/python/* -> jar:/resources/* I currently have the following line in build.sbt: Compile / unmanagedResourceD...
Mal
1

votes
0

answer
74

Views

Add git commit id in fat jar manifest using sbt

I am using sbt-assembly plugin to build a fat Jar for my scala project. Is there a way I can include git commit id in the jar manifest, something similar to what git-commit-id-plugin does for maven. Thanks
Abdul Rahman
1

votes
0

answer
90

Views

SBT won't run chisel tutorial… can't seem to find proper scala version

I installed OpenJDK and then SBT on my Fedora 28 system. SBT 1.2 comes from the bintray--sbt-rpm repository (the official one). Both seem to work fine, and I can do basic scala projects. Then I cloned the chisel-tutorial from the github chisel-tutorial site. But when I go into the chisel-tutorial di...
Poynter
1

votes
0

answer
115

Views

AWS - Repository not able to download redshift jdbc jar

I am trying to use redshift jdbc jar . I using the Amazon repository given in the link https://docs.aws.amazon.com/redshift/latest/mgmt/configure-jdbc-connection-with-maven.html. However the jar is AWS jar doesnt seem to download . Any pointers
Balaji V
1

votes
1

answer
223

Views

SBT, Scala, Spark, IntelliJ

this seems a bit silly but I can't figure out what is happening in my intelliJ project. The spark dependencies seem not to be set well. I searched a lot in here without finding the right answer. In build.sbt: libraryDependencies += 'junit' % 'junit' % '4.10' % Test libraryDependencies ++= Seq( 'org...
Oliver
1

votes
2

answer
594

Views

how to force sonatype nexus 3 to recreate maven-metadata.xml for maven repository?

I use sbt to publish new artifacts to a nexus-maven2 repository (my-maven-repo). The new artefacts appear in the nexus interface. Another sbt project uses these artefacts. When using exact requirements; he finds those, but when using a range; he fetches the list of available artifacts and that list...
Chris Maes
1

votes
1

answer
21

Views

Exclude specs2 as transitive dependency of play framework in sbt

I'm trying to use specs2 v3.10.0 with Play Framework v2.2.3 but Play depends on specs2 v2.1.1 and it seems like they are interfering with each other. In my plugins.sbt file, I have: addSbtPlugin('com.typesafe.play' % 'sbt-plugin' % '2.2.3' exclude('org.specs2', 'specs2')) See the Dependencies file o...
Travis
1

votes
1

answer
28

Views

Added dependencies to sbt sub-project tasks (e.g. compile, test) not executed

With the following build.sbt, containing a root project and a sub-project, I am adding simple tasks that print some text as dependencies to the compile tasks of the root and sub-project: ThisBuild / scalaVersion := '2.12.6' lazy val root = (project in file('.')) .settings(name := 'sbt-task-test') la...
David Cryer
1

votes
2

answer
34

Views

SBT 'dependsOn' but for publishLocal

dependsOn compiles all the submodules in the right order if you call it on the top level module. But the publishLocal command ignores these submodules. Is there any way to, given a multi-module sbt project, get it to compile+publishLocal the submodules in the correct order?
Gesar
1

votes
0

answer
141

Views

IntelliJ is producing “Server access Error: Unrecognized SSL message, plaintext connection” when creating a new Play framework project

My operating system is Fedora 28 running on VMware. I'm working behind a corporate so I have to use px-proxy to connect Fedora and other tech running inside it to the internet (Docker, DNF, etc). I have configured the proxy settings in Intellij already. So I went ahead and created a new Play projec...
TheRealRave
1

votes
1

answer
72

Views

SBT terminates silently when Git repository for build plugin can't be downloaded

SBT is silently failing when it can't download a plugin via SSH from a Git repository. This is the output of SBT when it's trying to download the repository: [info] Updating ProjectRef(uri('ssh://[email protected]/plugin.git'), 'plugin')... # (nothing after that line) And it just terminates after t...
Neil
1

votes
0

answer
247

Views

Intellij not picking dependencies from .ivy2 cache folder

I am using Intellij for scala project. I am using babun application for compiling/running/creating assembly jar for my project because in my organization, we can't use maven artifact repository and we have our own for downloading dependencies so I had setup proxy for it in babun(could not see such o...
Jeetendra Ahuja

View additional questions