Akka Testkit Error with Ambigous Version Error - sbt

I'm using Akka testkit library to test few of my actors.
Here is what I have in my build.sbt:
"com.typesafe.akka" %% "akka-testkit" % "2.6.10" % Test,
Here is the error that I get:
java.lang.IllegalStateException: You are using version 2.6.10 of Akka, but it appears you (perhaps indirectly) also depend on older versions of related artifacts. You can solve this by adding an explicit dependency on version 2.6.10 of the [akka-actor-typed, akka-slf4j, akka-protobuf-v3, akka-stream, akka-serialization-jackson] artifacts to your project. See also: https://doc.akka.io/docs/akka/current/common/binary-compatibility-rules.html#mixed-versioning-is-not-allowed
I'm confused as I do not have any other dependency to Akka as here is all the dependencies defined in my build.sbt:
libraryDependencies ++= Seq(
ws,
// Our streaming library
"io.monix" %% "monix" % "3.3.0",
// Dependencies needed for Slick
"com.typesafe.slick" %% "slick" % "3.3.3",
"com.typesafe.slick" %% "slick-hikaricp" % "3.3.3",
// For application Metrics
"io.dropwizard.metrics" % "metrics-core" % "4.1.16",
"io.dropwizard.metrics" % "metrics-jvm" % "4.1.16",
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.2",
"org.scala-lang.modules" % "scala-async_2.11" % "0.9.7",
"com.typesafe" % "config" % "1.4.1",
// For JSON parsing
"com.typesafe.play" %% "play-json" % "2.9.1",
"com.typesafe.play" %% "play-json-joda" % "2.9.1",
// JDBC driver for MySQL & H2
"mysql" % "mysql-connector-java" % "8.0.22",
"com.h2database" % "h2" % "1.4.186",
// Test dependencies
"com.typesafe.akka" %% "akka-testkit" % "2.6.10" % Test,
"org.scalatest" %% "scalatest" % "3.2.3" % Test,
"org.awaitility" % "awaitility" % "4.0.3" % Test,
"org.scalatestplus.play" %% "scalatestplus-play" % "5.1.0" % Test exclude ("org.slf4j", "slf4j-simple"),
"com.github.andyglow" %% "websocket-scala-client" % "0.3.0" % Test exclude ("org.slf4j", "slf4j-simple")
)
Any ideas how to fix this issue?

So I had to add few dependencies for Akka like this:
"com.typesafe.akka" %% "akka-testkit" % AkkaVersion % Test,
"com.typesafe.akka" %% "akka-slf4j" % AkkaVersion % Test,
"com.typesafe.akka" %% "akka-protobuf-v3" % AkkaVersion % Test,
"com.typesafe.akka" %% "akka-serialization-jackson" % AkkaVersion % Test,
"com.typesafe.akka" %% "akka-stream" % AkkaVersion % Test,
"com.typesafe.akka" %% "akka-actor-typed" % AkkaVersion % Test,
AkkaVersion in my case is 2.6.10
It looks ugly to have to mention these dependencies, but it is how I was able to get rid of the error.

Related

Where to put "enablePlugins" in SBT?

Following this tutorial, I am asked to add enablePlugins(WindowsPlugin) to my SBT configuration.
I did this by stating exactly this line in my build.sbt but all I get is "Cannot resolve symbol". Do I need to add the dependency somewhere?
Is this an auto plugin and can anyone explain to me what an auto plugin actually is and how I use it?
UPDATE: My build.sbt looks like that:
name := "ApplicationName"
version := "0.3-SNAPSHOT"
scalaVersion := "2.13.1"
enablePlugins(WindowsPlugin)
mainClass in assembly := Some("application.ConfigEditorApplication")
assemblyJarName in assembly := s"application-$version.jar"
assemblyMergeStrategy in assembly := {
case PathList("META-INF", xs#_*) => MergeStrategy.discard
case PathList("reference.conf") => MergeStrategy.concat
case x => MergeStrategy.first
}
libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.9"
libraryDependencies += "commons-io" % "commons-io" % "2.6"
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3"
libraryDependencies += "com.typesafe.scala-logging" % "scala-logging_2.13" % "3.9.2"
libraryDependencies += "com.typesafe.akka" %% "akka-actor-typed" % "2.6.3"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.1" % "test"
libraryDependencies += "org.scalamock" %% "scalamock" % "4.4.0" % Test
libraryDependencies += "org.mockito" % "mockito-scala_2.13" % "1.11.3"
libraryDependencies += "org.mockito" % "mockito-scala-scalatest_2.13" % "1.11.3"
I found the solution to my problem: From the beginning, I suspected, that the plugin needs to be added before it can be enabled. Unfortunately, nothing of that sort was mentioned in the tutorial I was following.
The plugin which has to be added is the native-packager plugin: addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.0").
You should create your auto pluggin in your build.sbt. The build.sbt file must be at the root of your projet, at the same level with the file src.
You have information about it here and here.
In the page you mentioned they say you should set this in your build.sbt. Try this.
// general package information (can be scoped to Windows)
maintainer := "Josh Suereth <joshua.suereth#typesafe.com>"
packageSummary := "test-windows"
packageDescription := """Test Windows MSI."""
// wix build information
wixProductId := "ce07be71-510d-414a-92d4-dff47631848a"
wixProductUpgradeId := "4552fb0e-e257-4dbd-9ecb-dba9dbacf424"
UPDATE
Also, I found this question which is related to yours. It is true, it is an old one, but it might give you some hints. Some answers suggest performing updatings, others deleting and then reimporting the project.

How to add dependent project in build.sbt for running sbt compile

I am new to sbt build.
I would like to add java files of a dependent project (say Proj A) to my compiling project (Proj B).
Running sbt compile in Proj B throws error that dependent project's java package/classes are not found.
I went through the link: https://www.scala-sbt.org/0.13/docs/Multi-Project.html but its not clear to me add this dependency to make it work.
I tried adding a below line in build.sbt, but it didnt work.
lazy val projB = project.dependsOn(/projA)
Updated
build.sbt of projB:
organization := "com.org"
name := "projB"
version := "1"
resolvers ++= Seq(
"Typesafe" at "http://repo.typesafe.com/typesafe/releases/",
"Java.net Maven2 Repository" at "http://download.java.net/maven/2/",
)
lazy val projB = project.dependsOn(projA)
// the library dependencies of springframework here
build.sbt of Proj A:
organization := "com.org"
name := "proj A"
version := "1"
resolvers ++= Seq(
"Typesafe" at "http://repo.typesafe.com/typesafe/releases/",
"Java.net Maven2 Repository" at "http://download.java.net/maven/2/",
)
// the library dependencies of springframework here
When i do sbt compile on proj B, it throws error the dependent classes are not found. Class Hbase is in Proj A.
[error] import com.org.config.Hbase;
[error] **\hbase\HbaseDAO.java:38:1:
cannot find symbol
[error] symbol: class Hbase
[error] location: class com.org.hbase.HbaseDAO
[error] private Hbase hbase;
[error] (Compile / compileIncremental) javac returned non-zero exit code
[error] Total time: 6 s, completed 29/08/2019 9:58:39 AM
Updated build.sbt after the suggestion:
inThisBuild(
Seq(
organization := "com.org",
version := "1",
resolvers ++= Seq(
"Typesafe" at "http://repo.typesafe.com/typesafe/releases/",
"Java.net Maven2 Repository" at "http://download.java.net/maven/2/",
)
)
)
lazy val root = project
.in(file("."))
.aggregate(projA,projB)
lazy val projA = project.settings(
// project A settings and library dependencies
libraryDependencies += "org.springframework.boot" % "spring-boot-starter-
parent" % "2.1.6.RELEASE" pomOnly()
libraryDependencies += "org.springframework.boot" % "spring-boot-starter-
web" % "2.1.6.RELEASE"
libraryDependencies += "org.springframework.data" % "spring-data-hadoop-
hbase" % "2.3.0.RELEASE"
libraryDependencies += "org.mortbay.jetty" % "jetty" % "7.0.0.pre5"
libraryDependencies += "io.netty" % "netty-all" % "5.0.0.Alpha2"
libraryDependencies += "commons-beanutils" % "commons-beanutils" % "1.9.4"
libraryDependencies += "commons-beanutils" % "commons-beanutils-core" %
"1.8.3"
libraryDependencies += "xerces" % "xercesImpl" % "2.12.0"
libraryDependencies += "org.apache.hadoop" % "hadoop-yarn-server-
nodemanager" % "3.2.0"
libraryDependencies += "org.apache.hadoop" % "hadoop-common" % "3.2.0"
libraryDependencies += "org.apache.hadoop" % "hadoop-common" % "2.7.0"
libraryDependencies += "org.apache.hadoop" % "hadoop-client" % "3.2.0"
libraryDependencies += "org.apache.hbase" % "hbase-client" % "2.1.1"
libraryDependencies += "org.apache.hbase" % "hbase" % "2.1.1" pomOnly()
libraryDependencies += "org.apache.hbase" % "hbase-common" % "2.1.1"
)
lazy val projB = project
.dependsOn(projA)
.settings(
// project B settings and library dependencies
libraryDependencies += "org.springframework.boot" % "spring-boot-starter-
parent" % "2.1.6.RELEASE" pomOnly()
libraryDependencies += "org.springframework.boot" % "spring-boot-starter-
web" % "2.1.6.RELEASE"
libraryDependencies += "org.springframework.data" % "spring-data-hadoop-
hbase" % "2.3.0.RELEASE"
libraryDependencies += "org.mortbay.jetty" % "jetty" % "7.0.0.pre5"
libraryDependencies += "io.netty" % "netty-all" % "5.0.0.Alpha2"
libraryDependencies += "commons-beanutils" % "commons-beanutils" % "1.9.4"
libraryDependencies += "commons-beanutils" % "commons-beanutils-core" %
"1.8.3"
libraryDependencies += "xerces" % "xercesImpl" % "2.12.0"
libraryDependencies += "org.apache.hadoop" % "hadoop-yarn-server-
nodemanager" % "3.2.0"
libraryDependencies += "com.fasterxml.jackson.core" % "jackson-databind" %
"2.10.0.pr2"
libraryDependencies += "org.apache.hadoop" % "hadoop-common" % "3.2.0"
libraryDependencies += "org.apache.hadoop" % "hadoop-client" % "3.2.0"
libraryDependencies += "org.apache.hbase" % "hbase-client" % "2.1.1"
libraryDependencies += "org.apache.hbase" % "hbase" % "2.1.1" pomOnly()
libraryDependencies += "org.apache.hbase" % "hbase-common" % "2.1.1"
)
An error is thrown while sbt compile after the below library dependency in both project settings projA and projB
libraryDependencies += "org.springframework.boot" % "spring-boot-starter-
web" % "2.1.6.RELEASE"
')' expected but string literal found is thrown for this line in projA settings and
';' expected but string literal found is thrown for this line in projB settings.
I couldnt get much clue with this err.
Looking at the two snippets you posted, I'm guessing that you have two separate build.sbt files, one for each subproject. This makes them independent and one project just doesn't see the other. While it may be possible to have multiple build.sbt files for the subprojects, it's recommended to define the whole multiproject build in a single build.sbt file in the root of the project.
For example, if you structure your project like this:
├── project
│ ├── build.properties
│ └── plugins.sbt
├── projA
│ └── src
├── projB
│ └── src
└── build.sbt
Then you can put all the build settings and subproject relations in the root build.sbt:
inThisBuild(
Seq(
organization := "com.org",
version := "1",
resolvers ++= Seq(
"Typesafe" at "http://repo.typesafe.com/typesafe/releases/",
"Java.net Maven2 Repository" at "http://download.java.net/maven/2/",
)
)
)
lazy val root = project
.in(file("."))
.aggregate(projA, projB)
lazy val projA = project
.settings(
// project A settings and library dependencies
)
lazy val projB = project
.dependsOn(projA)
.settings(
// project B settings and library dependencies
)
Then if you launch an sbt shell from the root of the project, you can call compile (or any other task) to compile both projA and projB, or you can call projA/compile to compile that subproject specifically.
You are already reading documentation, so you know where to find more information. Notice that the link you provided points to the old documentation, at the top there is a banner pointing to the new page: https://www.scala-sbt.org/1.x/docs/Multi-Project.html

Why won't sbt-assembly shade json4s using inLibrary?

Using sbt-assembly 0.14.6:
addSbtPlugin("com.eed3si9n" %% "sbt-assembly" % "0.14.6")
Creating an uber jar for a Spark app with sbt-assembly, including a couple dependencies to be shaded:
libraryDependencies += "org.json4s" % "json4s-native_2.11" % "3.5.3",
libraryDependencies += "com.typesafe" % "config" % "1.3.3",
That's actually a second attempt, I really want to
libraryDependencies += "org.json4s" %% "json4s-native" % "3.5.3",
libraryDependencies += "com.typesafe" % "config" % "1.3.3",
but thought maybe shading was causing my trouble when using %% in the moduleID. So, what works and what doesn't:
sbt-assembly can shade a couple libraries like so:
assemblyShadeRules in assembly := Seq(
ShadeRule.rename("org.json4s.**" -> "shaded_json4s.#1").inAll,
ShadeRule.rename("com.typesafe.config.**" -> "my_conf.#1")
.inLibrary("com.typesafe" % "config" % "1.3.3")
.inProject
),
Example shaded classes:
my_conf/parser/ConfigNode.class
shaded_json4s/FieldSerializer.class
Both libraries get shaded. I'd like to get more specific, avoiding inAll:
assemblyShadeRules in assembly := Seq(
ShadeRule.rename("org.json4s.**" -> "shaded_json4s.#1")
.inLibrary("org.json4s" % "json4s-native_2.11" % "3.5.3")
.inProject,
ShadeRule.rename("com.typesafe.config.**" -> "my_conf.#1")
.inLibrary("com.typesafe" % "config" % "1.3.3")
.inProject
),
But that doesn't shade json4s classes:
my_conf/parser/ConfigNode.class
org/json4s/FieldSerializer.class
But what I started with, and would really prefer is:
assemblyShadeRules in assembly := Seq(
ShadeRule.rename("org.json4s.**" -> "shaded_json4s.#1")
.inLibrary("org.json4s" %% "json4s-native" % "3.5.3")
.inProject,
ShadeRule.rename("com.typesafe.config.**" -> "my_conf.#1")
.inLibrary("com.typesafe" % "config" % "1.3.3")
.inProject
),
But that doesn't shade json4s classes, either:
my_conf/parser/ConfigNode.class
org/json4s/FieldSerializer.class
Is there something I need to do differently for shading to work on json4s when using inLibrary?

How can I add process parameters using sbt-native-packager?

How can I add process parameters using sbt-native-packager configuration? I want to add the options for redirect process stderr to file? To have the result like that:
sudo -u app bash -c "app >>/var/log/app/stderr.log 2>&1"
I use sbt-native-packager 1.2.0-M5 for build deb package with JavaServerAppPackaging, JDebPackaging, SystemdPlugin, UpstartPlugin the exception in logs, only in stderr. Also I must delete app pid manually after crash and if it exists, then I have error in stderr.
My plugins.sbt:
resolvers += Resolver.bintrayRepo("sbt", "sbt-plugin-releases")
// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.8-netty-4.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.2.0-M5")
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.2")
addSbtPlugin("com.lightbend.sbt" % "sbt-javaagent" % "0.1.1")
libraryDependencies += "org.vafer" % "jdeb" % "1.3" artifacts (Artifact("jdeb", "jar", "jar"))
my build.sbt:
...
debianPackageDependencies in Debian ++= Seq("postgresql-9.5 (>= 9.5.1)")
lazy val root = (project in file(".")).enablePlugins(PlayScala, JavaAgent)
scalaVersion := "2.11.8"
val akkaVersion = "2.4.10"
libraryDependencies ++= Seq(
"org.postgresql" % "postgresql" % "9.4.1208",
"org.scalikejdbc" %% "scalikejdbc" % "2.4.0",
"org.scalikejdbc" %% "scalikejdbc-config" % "2.4.0",
"org.scalikejdbc" %% "scalikejdbc-play-initializer" % "2.5.1",
"org.flywaydb" %% "flyway-play" % "3.0.1",
"com.typesafe.akka" %% "akka-contrib" % akkaVersion,
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"io.dropwizard.metrics" % "metrics-core" % "3.1.2",
"io.dropwizard.metrics" % "metrics-jvm" % "3.1.2",
"org.coursera" % "dropwizard-metrics-datadog" % "1.1.4",
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % Test,
"com.relayrides" % "pushy" % "0.8",
"com.relayrides" % "pushy-dropwizard-metrics-listener" % "0.8",
"org.eclipse.jetty.alpn" % "alpn-api" % "1.1.3.v20160715" % "runtime",
ws,
specs2 % Test
)
resolvers += "Typesafe Releases" at "http://repo.typesafe.com/typesafe/maven-releases/"
resolvers += Resolver.mavenLocal
routesGenerator := InjectedRoutesGenerator
javaOptions in Test ++= Seq("-Dlogger.resource=logback-test.xml")
scalacOptions in Universal ++= Seq("-unchecked", "-deprecation", "-notailcalls")
javaOptions in Universal ++= Seq(
"-J-server",
...
)
...
import com.typesafe.sbt.packager.archetypes.systemloader._
// UpstartPlugin for ubuntu 14.04, SystemdPlugin for ubuntu 16.04
enablePlugins(JavaServerAppPackaging, JDebPackaging, SystemdPlugin, UpstartPlugin)
requiredStartFacilities := Some("datadog-agent.service, systemd-journald.service, postgresql.service")
javaAgents += "org.mortbay.jetty.alpn" % "jetty-alpn-agent" % "2.0.4" % "dist"
ps I found a workaround, in ubuntu 16.04 I can use journald to collect all the logs in the system.
Thanks for updating the question with all relevant information. There are a couple of things here.
Only one Systemloader plugin
You enable SystemdPlugin and UpstartPlugin. If it works, it only works by accident. No version of native-packager was designed to support multiple systemloader for a single package type in a single build module.
The solution is to create sub modules with the relevant systemloader enabled.
Logging to stderr
You are right regarding systemd. It provides facilities to capture the log output of your process. If you like you can add your findings to the native-packager documentation ( there is a systemd plugin section ).
The upstart support in native-packager is rather simple. There weren't a lot of requeset as Ubuntu is switching to systemd and you can always fallback to systemv. Which brings me to the solution to your problem.
You can use the SystemVPlugin, which supports a daemon_log_file. The systemv documentation provides you with the necessary details.
cheers,
Muki

sbt: "impossible to get artifacts when data has not been loaded. IvyNode = org.antlr#stringtemplate;3.2.1"

This looks like an Ivy problem surfacing via sbt (0.11.2) when I invoke the sbt-eclipse plugin:
> eclipse with-source=true
...
[info] Resolving com.googlecode.linkedin-j#linkedin-j-core;1.0.416 ...
[info] Resolving oauth.signpost#signpost-core;1.2.1.1 ...
[info] Resolving net.sf.kxml#kxml2;2.3.0 ...
[info] Resolving commons-cli#commons-cli;1.2 ...
[info] Resolving javax.servlet#servlet-api;2.5 ...
[error] impossible to get artifacts when data has not been loaded. IvyNode = org.antlr#stringtemplate;3.2.1
[error] {file:/home/yang/pod/sales/scala/}pod/*:update-classifiers: java.lang.IllegalStateException: impossible to get artifacts when data has not been loaded. IvyNode = org.antlr#stringtemplate;3.2.1
[info] Resolving org.scala-lang#scala-library;2.9.1 ...
[info] Resolving com.google.protobuf#protobuf-java;2.4.1 ...
[info] Resolving org.scalaquery#scalaquery_2.9.0;0.9.4 ...
[info] Resolving postgresql#postgresql;9.0-801.jdbc4 ...
...
[info] Resolving oauth.signpost#signpost-core;1.2.1.1 ...
[info] Resolving net.sf.kxml#kxml2;2.3.0 ...
[info] Resolving commons-cli#commons-cli;1.2 ...
[info] Resolving javax.servlet#servlet-api;2.5 ...
[error] impossible to get artifacts when data has not been loaded. IvyNode = org.antlr#stringtemplate;3.2.1
[error] {file:/home/yang/pod/sales/scala/}pod/*:update-classifiers: java.lang.IllegalStateException: impossible to get artifacts when data has not been loaded. IvyNode = org.antlr#stringtemplate;3.2.1
[error] Could not create Eclipse project files: Error evaluating task 'update-classifiers': error, Error evaluating task 'update-classifiers': error
I tried blowing away my ~/.{m2,ivy,sbt} directories, to no avail. Relevant extracts from my build.sbt:
...
scalaVersion := "2.9.1"
seq(coffeeSettings: _*)
seq(webSettings: _*)
seq(sbtprotobuf.ProtobufPlugin.protobufSettings: _*)
seq(Revolver.settings: _*)
libraryDependencies ++= Seq(
"org.scalaquery" % "scalaquery_2.9.0" % "0.9.4",
"postgresql" % "postgresql" % "9.0-801.jdbc4", // % "runtime",
"com.jolbox" % "bonecp" % "0.7.1.RELEASE",
"ru.circumflex" % "circumflex-orm" % "2.1-SNAPSHOT",
"ru.circumflex" % "circumflex-core" % "2.1-SNAPSHOT",
"net.sf.ehcache" % "ehcache-core" % "2.4.3",
// snapshots needed for scala 2.9.0 support
"org.scalatra" %% "scalatra" % "2.1.0-SNAPSHOT",
"org.scalatra" %% "scalatra-scalate" % "2.1.0-SNAPSHOT",
"org.scalatra" %% "scalatra-fileupload" % "2.1.0-SNAPSHOT",
"org.fusesource.scalate" % "scalate-jruby" % "1.5.0",
"org.fusesource.scalamd" % "scalamd" % "1.5", // % runtime,
"org.mortbay.jetty" % "jetty" % "6.1.22",
"net.debasishg" % "sjson_2.9.0" % "0.12",
"com.lambdaworks" % "scrypt" % "1.2.0",
"org.mortbay.jetty" % "jetty" % "6.1.22" % "container",
// "org.bowlerframework" %% "core" % "0.4.1",
"net.sf.opencsv" % "opencsv" % "2.1",
"org.apache.commons" % "commons-math" % "2.2",
"org.apache.commons" % "commons-lang3" % "3.0",
"com.google.protobuf" % "protobuf-java" % "2.4.1",
"ch.qos.logback" % "logback-classic" % "0.9.29",
"org.scalatest" % "scalatest_2.9.0" % "1.6.1",
"com.h2database" % "h2" % "1.3.158",
"pentaho.weka" % "pdm-3.7-ce" % "SNAPSHOT",
// this line doesn't work due to sbt bug:
// https://github.com/harrah/xsbt/issues/263
// work around by manually downloading this into the lib/ directory
// "org.rosuda" % "jri" % "0.9-1" from "https://dev.partyondata.com/deps/jri-0.9-1.jar",
"net.java.dev.jna" % "jna" % "3.3.0",
"org.scalala" % "scalala_2.9.0" % "1.0.0.RC2-SNAPSHOT",
"com.joestelmach" % "natty" % "0.5",
"rhino" % "js" % "1.7R2",
"junit" % "junit" % "4.9",
"org.apache.commons" % "commons-email" % "1.2",
"commons-validator" % "commons-validator" % "1.3.1",
"oro" % "oro" % "2.0.8", // validator depends on this
"org.scala-tools.time" %% "time" % "0.5",
"com.carrotsearch" % "hppc" % "0.4.1",
// "com.twitter" %% "util" % "1.12.12",
"com.yammer.metrics" % "metrics-core" % "2.0.0-RC0",
"org.clapper" %% "grizzled-scala" % "1.0.9",
"com.googlecode.linkedin-j" % "linkedin-j-core" % "1.0.416",
"javax.servlet" % "servlet-api" % "2.5" % "provided->default"
)
fork in run := true
mainClass in Revolver.reStart := Some("com.partyondata.Web")
javaOptions ++= (
Seq(
"-Dcom.sun.management.jmxremote",
"-Dcom.sun.management.jmxremote.port=3030",
"-Dcom.sun.management.jmxremote.authenticate=false",
"-Dcom.sun.management.jmxremote.ssl=false",
"-Xmx3G",
"-Djava.library.path=" + System.getenv("HOME") +
"/R/x86_64-pc-linux-gnu-library/2.13/rJava/jri:" +
"/usr/lib/R/site-library/rJava/jri"
)
)
javaOptions in Revolver.reStart <++= javaOptions
javaOptions ++= (System.getenv("JREBEL_PATH") match {
case null => Seq()
case path => Seq("-javaagent:" + path)
})
scalacOptions ++= Seq("-g:vars", "-deprecation", "-unchecked")
// needed for the scalatra snapshots
resolvers ++= Seq(
"Twitter" at "http://maven.twttr.com/",
"Scala-Tools Snapshots" at "http://scala-tools.org/repo-snapshots/",
"Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/",
...
)
initialCommands in consoleQuick := """
import scalala.scalar._;
import scalala.tensor.::;
import scalala.tensor.mutable._;
import scalala.tensor.dense._;
import scalala.tensor.sparse._;
import scalala.library.Library._;
import scalala.library.LinearAlgebra._;
import scalala.library.Statistics._;
import scalala.library.Plotting._;
import scalala.operators.Implicits._;
//
import scala.collection.{mutable => mut}
import scala.collection.JavaConversions._
import ru.circumflex.orm._
import ru.circumflex.core._
"""
And my plugins.sbt:
//
// xsbt-web-plugin
//
libraryDependencies <+= sbtVersion(v => v match {
case "0.11.0" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.0-0.2.8"
case "0.11.1" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.1-0.2.10"
case "0.11.2" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.2-0.2.11"
})
//
// sbteclipse
//
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.0.0")
//
// sbt-protobuf
//
resolvers += "gseitz#github" at "http://gseitz.github.com/maven/"
addSbtPlugin("com.github.gseitz" % "sbt-protobuf" % "0.2.2")
//
// coffeescripted-sbt: this doesn't work
//
resolvers += "less is" at "http://repo.lessis.me"
addSbtPlugin("me.lessis" % "coffeescripted-sbt" % "0.2.0")
//
// sbt-resolver
//
resolvers += "spray repo" at "http://repo.spray.cc"
addSbtPlugin("cc.spray" % "sbt-revolver" % "0.6.0")
This problem only occurs if I include the dependency:
"com.joestelmach" % "natty" % "0.5"
Any ideas on how to work around this issue? Thanks in advance.
I had a similar issue with a dependency of camel test spring. Fixed it by marking it intransitive
libraryDependencies += "org.apache.camel" % "camel-test-spring" % "2.10.1" % "test" intransitive()
You could try adding this line to .sbt file:
dependencyOverrides += "org.apache.camel" % "camel-test-spring" % "2.10.1" % "test"

Resources