sbt

sbt illegal dynamic reference in runMain

放肆的年华 提交于 2020-01-02 14:32:14
问题 I'm trying to run a code generator, and passing it the filename to write the output: resourceGenerators in (proj, Compile) += Def.task { val file = (resourceManaged in (proj, Compile)).value / "swagger.yaml" (runMain in (proj, Compile)).toTask(s"api.swagger.SwaggerDump $file").value Seq(file) }.value However, this gives me: build.sbt:172: error: Illegal dynamic reference: file (runMain in (proj, Compile)).toTask(s"api.swagger.SwaggerDump $file").value 回答1: Your code snippet has two problems:

How to run a command when sbt starts and keep the session active?

こ雲淡風輕ζ 提交于 2020-01-02 13:14:33
问题 If we define initialCommands in console += "1+1" this will run after console is executed. Is it possible to run a command after sbt starts, like initialCommands in sbtStartup += "console" to enter the console automatically? I'd like to keep the session (after executing the command) active. 回答1: from http://www.scala-sbt.org/0.13.5/docs/faq.html#how-can-i-take-action-when-the-project-is-loaded-or-unloaded http://www.scala-sbt.org/0.13.5/api/index.html#sbt.StateOps onLoad in Global := { ((s:

IDEA sbt编译出错unresolved dependency: com.eed3si9n#sbt-assembly;0.13.0: not found

喜你入骨 提交于 2020-01-02 12:03:29
IDEA sbt编译出错unresolved dependency: com.eed3si9n#sbt-assembly;0.13.0: not found sbt编译的时候报错: unresolved dependency: com.eed3si9n#sbt-assembly;0.13.0: not found 我这里的原因是sbt的版本对不上,找到project文件夹下的build.properties文件, 将里面的内容改为 sbt.version=0.13.15 即可解决。 来源: CSDN 作者: voidfaceless 链接: https://blog.csdn.net/voidfaceless/article/details/103799475

i need sbt 0.11.2 to build the mongo auth app for lift

拜拜、爱过 提交于 2020-01-02 11:15:11
问题 For some reason sbt bails on .11.3 when working with the mongodb-record auth project, and it seems to me that's the only version i can download from the git site. 回答1: The idiomatic way is to specify sbt version in build.properties as sbt.version=0.11.2 But since group id in 0.11.3 was changed from org.scala-tools.sbt to org.scala-sbt , sbt can't resolve older versions. But you still can manually download older version of launcher from typesafe repo. 来源: https://stackoverflow.com/questions

How could SBT choose highest version amongst dependencies?

大兔子大兔子 提交于 2020-01-02 10:23:40
问题 This is a question about versioning and workflow. I have multiple projects projectA/build.sbt version := "1.0.0" libraryDependencies ++= Seq( "com.example" % "projectB" % "1.0.0", "com.example" % "util" % "1.0.0" ) projectB/build.sbt version := "1.0.0" libraryDependencies ++= Seq( "com.example" % "util" % "1.0.0" ) util/build.sbt version := "1.0.0" ------------------------ DEVELOPMENT ------------------------ I added a method in util . util/build.sbt version := "2.0.0" This added

build.sbt defining project dependency between modules

浪子不回头ぞ 提交于 2020-01-02 10:22:54
问题 I have project in PlayFramework. It has one main project without any code/logic. And it have few submodules: main: admin common shop Modules: admin and shop will base on common module (classes like: user, role, permission), so I have to configure it that way: lazy val shop = project.in(file("modules/shop")) .dependsOn(cirs) .dependsOn(common) .dependsOn(admin) lazy val admin = project.in(file("modules/admin")) .dependsOn(cirs) .dependsOn(common) .dependsOn(shop) But in module common I have

Can't expand macros compiled by previous versions of Scala (scala 2.11.4, sbt 0.13.7, JDK 8)

别来无恙 提交于 2020-01-02 10:06:10
问题 I'm converting a project to Scala 2.11.4 and sbt 0.13.7. I got a lot of errors, some of them are: can't expand macros compiled by previous versions of Scala [error] preloadDevice <<= preloadDeviceTask for this code: lazy val settings: Seq[Setting[_]] = inConfig(Android) (Seq( // Preload Scala on the device/emulator preloadDevice <<= preloadDeviceTask, preloadEmulator <<= InputTask( (sdkPath)(AndroidProject.installedAvds(_)))(preloadEmulatorTask), // Uninstall previously preloaded Scala

How to build an eclipse plugin with sbt and sbt-osgi?

梦想的初衷 提交于 2020-01-02 08:59:09
问题 Is it possible to build an eclipse plugin with a sbt build ? Once built, do I just drop de jar in the plugin directory of eclipse ? Update: sbt-tycho look promising but for sbt 0.7 回答1: There is a giter8 template from the scala-ide group to build a scala eclipse plugin using maven g8 scala-ide/scala-plugin.g8 Update: Best way to create a plugin is via the plugin developpement environement (PDE). From there you can add the scala nature. 来源: https://stackoverflow.com/questions/14741539/how-to

How to use sbt behind authenticated proxy?

让人想犯罪 __ 提交于 2020-01-02 07:26:09
问题 As given in other answers. I have properly set the value of http proxy host and port. but it is giving the following error Getting org.scala-sbt sbt 0.13.6 ... You probably access the destination server through a proxy server that is not well configured. You probably access the destination server through a proxy server that is not well configured. You probably access the destination server through a proxy server that is not well configured. :: problems summary :: :::: WARNINGS Host repo

How can I run DataNucleus Bytecode Enhancer from SBT?

非 Y 不嫁゛ 提交于 2020-01-02 07:10:38
问题 I've put together a proof of concept which aims to provide a skeleton SBT multimodule project which utilizes DataNucleus JDO Enhancer with mixed Java and Scala sources. The difficulty appears when I try to enhance persistence classes from SBT. Apparently, I'm not passing the correct classpath when calling Fork.java.fork(...) from SBT. See also this question: How can SBT generate metamodel classes from model classes using DataNucleus? Exception in thread "main" java.lang.NoClassDefFoundError: