sbt

How do I get SBT staging directory at build time?

跟風遠走 提交于 2020-01-15 07:05:49
问题 How do I get SBT staging directory at build time? I want to do a tricky clone of a remote repo, and the stagingDirectory of SBT seems to be a nice fit. How do I get the directory inside "Build.scala" ? SBT source code: http://www.scala-sbt.org/0.13.1/sxr/sbt/BuildPaths.scala.html#sbt.BuildPaths.stagingDirectory ======= Underlying problem NOT directly relevant to the question. I wanted to use a subdirectory of a git dependency in SBT. SBT doesn't provide this out of the box so I wrote a simple

unresolved dependencies - Error while importing SBT project

限于喜欢 提交于 2020-01-15 06:43:12
问题 Error while importing SBT project: ... [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: org.apache.hadoop#hadoop-mapreduce-client-app;2.6.0-cdh5.4.2: not found [warn] :: org.apache.hadoop#hadoop-mapreduce-client-core;2.6.0-cdh5.4.2: not found [warn] :: org.apache.hadoop#hadoop-mapreduce-client-jobclient;2.6.0-cdh5.4.2: not found [warn] :::::::::::::::::::::::::::::::::::::::::::::: [trace

Adding joda-time as manageable dependency via sbt

会有一股神秘感。 提交于 2020-01-15 03:30:29
问题 I'm having trouble using joda-time in my scala project in scala-ide. I have the following line: import org.joda.time.DateTime But it causes the following error: object joda is not a member of package org That's what I did: I put these lines in build.sbt : libraryDependencies += "joda-time" % "joda-time" % "2.9.3" libraryDependencies += "org.joda" % "joda-convert" % "1.8" Then I ran reload in my sbt session. Then I ran update in my sbt session. So what did I miss? 回答1: sbt eclipse fixed the

how to get internal project dependency jar path in SBT

99封情书 提交于 2020-01-14 19:06:25
问题 I am implementing custom deploy Task in SBT and I need to copy all required jars to deployment folder. I am able to get paths to all external dependencies using update TaskKey. Unfortunately updateReport does not include internal dependencies. Here is my simple configuration val deploy = TaskKey[Unit]("deploy","deploy") lazy val projectA = Project(id=project-a, settings=Project.defaultSettings) lazy val projectB = Project(id=project-b, settings=Project.defaultSettings) dependsOn(projectA)

Play sub-projects do not compile

回眸只為那壹抹淺笑 提交于 2020-01-14 18:51:50
问题 Here is the layout of my multi-project Play 2.2 application - I'm still trying to convert to build.sbt: myApp + app + build.sbt + conf | + routes + project | + build.properties | + Build.scala | + plugin.sbt + modules + myModule + app + build.sbt + conf + routes myApp/build.sbt: name := "myApp" version := "1.0-SNAPSHOT" organization := "com.mydomain" lazy val myModule = project.in(file("modules/myModule")) lazy val main = project.in(file(".")).dependsOn(myModule).aggregate(myModule) play

Play sub-projects do not compile

為{幸葍}努か 提交于 2020-01-14 18:51:07
问题 Here is the layout of my multi-project Play 2.2 application - I'm still trying to convert to build.sbt: myApp + app + build.sbt + conf | + routes + project | + build.properties | + Build.scala | + plugin.sbt + modules + myModule + app + build.sbt + conf + routes myApp/build.sbt: name := "myApp" version := "1.0-SNAPSHOT" organization := "com.mydomain" lazy val myModule = project.in(file("modules/myModule")) lazy val main = project.in(file(".")).dependsOn(myModule).aggregate(myModule) play

How to override dependency on certain task in sbt

陌路散爱 提交于 2020-01-14 13:43:26
问题 I want to override dependency on project in certain Task. I have a sbt multi-project which using spark. lazy val core = // Some Project val sparkLibs = Seq( "org.apache.spark" %% "spark-core" % "1.6.1" ) val sparkLibsProvided = Seq( "org.apache.spark" %% "spark-core" % "1.6.1" % "provided" ) lazy val main = Project( id = "main", base = file("main-project"), settings = sharedSettings ).settings( name := "main", libraryDependencies ++= sparkLibs, dependencyOverrides ++= Set( "com.fasterxml

play 2.3.8 sbt excluding logback

时光毁灭记忆、已成空白 提交于 2020-01-14 08:18:10
问题 I'm having a really hard time excluding logback from my play 2.3.8 test run. I've tried many exclude rules, but nothing seems to work. I also can't find it in my dependency tree. Snippet from my sbt file: [...] resolvers ++= Seq( "Typesafe repository snapshots" at "http://repo.typesafe.com/typesafe/snapshots/", "Typesafe repository releases" at "http://repo.typesafe.com/typesafe/releases/", "Sonatype repo" at "https://oss.sonatype.org/content/groups/scala-tools/", "Sonatype releases" at

play 2.3.8 sbt excluding logback

空扰寡人 提交于 2020-01-14 08:17:35
问题 I'm having a really hard time excluding logback from my play 2.3.8 test run. I've tried many exclude rules, but nothing seems to work. I also can't find it in my dependency tree. Snippet from my sbt file: [...] resolvers ++= Seq( "Typesafe repository snapshots" at "http://repo.typesafe.com/typesafe/snapshots/", "Typesafe repository releases" at "http://repo.typesafe.com/typesafe/releases/", "Sonatype repo" at "https://oss.sonatype.org/content/groups/scala-tools/", "Sonatype releases" at

Setting up multiple test folders in a SBT project

蹲街弑〆低调 提交于 2020-01-14 07:45:09
问题 We'd like to set up our SBT project so that we have multiple test folders as opposed to one. So we'd like to see: root src test scala unit functional How would we configure our SBT project file paths to do this? 回答1: SBT 0.9.x: (sourceDirectories in Test) := Seq(new File("src/test/scala/unit"), new File("src/test/scala/functional")) SBT 0.7.x : override def testSourceRoots = ("src" / "test") +++ "scala" +++ ("unit" / "functional") 来源: https://stackoverflow.com/questions/6212540/setting-up