sbt

Can't connect to mysql database with play-slick 1.0.1/slick 3.0 : configuration error

自作多情 提交于 2019-12-20 05:35:15
问题 I'm trying to migrate from anorm to slick, using play 2.4.2, and getting a configuration error: play.api.Configuration$$anon$1: Configuration error[Cannot connect to database [dethcs]] at play.api.Configuration$.configError(Configuration.scala:178) ~[play_2.11-2.4.0.jar:2.4.0] ... Caused by: slick.SlickException: Error getting instance of Slick driver "slick.driver.MySQLDriver" ... Caused by: java.lang.NoSuchMethodException: slick.driver.MySQLDriver.<init>() Previous answers I've found on SO

Lifty and SBT 0.12

£可爱£侵袭症+ 提交于 2019-12-20 04:55:19
问题 I'm new to using SBT, and I'm trying to install and configure Lifty, however when I try to run sbt, I get the following error: [error] (*:update) sbt.ResolveException: unresolved dependency: org.lifty#lifty;1.7.4: not found As per the Installing the Plugin instructions for Lifty, my ~/.sbt/plugins/build.sbt file looks like: resolvers += Resolver.url("sbt-plugin-releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns) addSbtPlugin(

SBT plugin: How to list files output by incremental recompilation

纵饮孤独 提交于 2019-12-20 04:24:25
问题 I am writing a plugin for SBT that requires a list of the class files generated by the last run of the Scala compiler. This list of class files is then passed into a program that performs some bytecode transformations. Since this transformation process can be slow, I only want the class files written by the last run of the Scala compiler (i.e. those that there modified), not all class files in the output directory. How can I obtain a list of the files last generated by the compile task? 回答1:

SBT “package” depend on “test”

南楼画角 提交于 2019-12-20 04:24:19
问题 How do I make target "package" depend on target "test" ? There is a solution here: Force sbt 0.11 to run tests But it doesn't really work with the xsbt-web-plugin. 回答1: Here's what I did: Keys.`package` <<= (test in Test, Keys.`package` in Compile) map { (_, in) => println("after package & test") in } It runs test, and iff the tests were successful, runs package task. (tested on fresh install of lift-2.5-RC2) 来源: https://stackoverflow.com/questions/15547784/sbt-package-depend-on-test

Play 2.2.2 / com.typesafe.play#play_2.10;2.2.2: not found on Heroku

谁都会走 提交于 2019-12-20 04:12:53
问题 All works well with Play 2.2.1. However, when upgrading to Play 2.2.2 and deploying to Heroku, process warns about: sbt.ResolveException: unresolved dependency: com.typesafe.play#play_2.10;2.2.2: not found unresolved dependency: com.typesafe.play#play-cache_2.10;2.2.2: not found unresolved dependency: com.typesafe.play#filters-helpers_2.10;2.2.2: not found unresolved dependency: com.typesafe.play#play-test_2.10;2.2.2: not found unresolved dependency: com.typesafe.play#play-docs_2.10;2.2.2:

Test in Eclipse works but sbt throws MissingRequirementError: object scala.runtime in compiler mirror not found

不打扰是莪最后的温柔 提交于 2019-12-20 03:30:11
问题 I am messing around with parsing and scala.tools.nsc.interactive.Global in Scala and I ran into a problem while executing tests under sbt. The tests run fine from Eclipse both with JUnitRunner and the ScalaTest plugin. After long time spent on Google I can't figure out how to fix this. When I execute sbt test the following error is thrown: Exception encountered when attempting to run a suite with class name: compileutils.CompileTest *** ABORTED *** [info] java.lang.ExceptionInInitializerError

Scala fat jar dependency issue while Job submit

岁酱吖の 提交于 2019-12-20 03:04:56
问题 I have written simple kafka stream using Scala. It is working good in local. I have taken fat jar and submitted in scala cluster. I am getting class not found error after submit the job. if I extract the fat jar, it has all dependency inside the fat jar. why I am getting class not found error ?. How to solve this ? Note: if I deploy(copy) the fat jar into Spark/jars folder manually. I don't see any issue. But, it is not correct approach I am using window 7 & running master and worker node on

Scala project using sbt throws NullPointerException

谁都会走 提交于 2019-12-20 02:53:09
问题 I cloned the project from here, and tried to load it in Terminal by opening the directory and using the command sbt . But this shows error like this: java.lang.NullPointerException at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1769) at java.base/java.util.regex.Matcher.reset(Matcher.java:416) at java.base/java.util.regex.Matcher.<init>(Matcher.java:253) at java.base/java.util.regex.Pattern.matcher(Pattern.java:1130) at java.base/java.util.regex.Pattern.split(Pattern.java

Setting javac options for SBT dependencies

微笑、不失礼 提交于 2019-12-20 01:13:57
问题 I am having problems compiling a Java dependency loaded via GIT: object ApplicationBuild extends Build { lazy val project = Project("root", file(".")).dependsOn(RootProject(riakJavaClient)) lazy val riakJavaClient = uri("git://github.com/basho/riak-java-client") } The error I am receiving from sbt compile is: [info] Compiling 134 Java sources to /Users/lawrencewagerfield/.sbt/0.13/staging/da0e66c4764a467c8977/riak-java-client/target/scala-2.10/classes... [error] /Users/lawrencewagerfield/.sbt

Classpath resources inside one-jar packaged via sbt

試著忘記壹切 提交于 2019-12-20 01:10:06
问题 I have a project that is build using SBT which packages a single jar using the one-jar plugin. That project contains a bunch of json files in src/main/resources/fixture which I used to access via new java.io.File(App.getClass.getResource("/fixture").getFile Unfortunately this doesn't work any longer since no Resource is returned. I think one-jar uses a special classloading mechanism? Whats the best way to solve this? 回答1: I think one-jar uses a special classloading mechanism? Yes, this must