在SBT交互模式下,我可以在任务前加上配置名称(限定作用域的命令): $ sbt
> compile
> Compile / compile
> Test / compile 我也可以在批处理模式(非交互模式)下运行任务。 $ sbt compile 但是跑步 $ sbt Test / compile 给出一个错误 [info] Executing in batch mode. For better performance use sbt's shell
[error] Not a valid command: Test (similar: set, last, e
我从sbt-0.13.9.msi下载并安装了。然而,它报告说它实际上是0.13.8:
>sbt --version
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; sup
port was removed in 8.0
sbt launcher version 0.13.8
sbt about也报告了同样的情况:
>sbt about
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=2
我对sbt工具感到困惑。我想定义两个Java选项,一个用于sbt run目标,另一个用于sbt test目标。这些选项需要对VM进行分叉,我不希望其他命令(如compile、update)出现这种情况。
如何在build.sbt中优雅地定义这一点?
Compile的作用是什么?那Test呢
如何只声明一次fork,以便它同时适用于sbt run和sbt test
我使用sbt已经有几年了。读读文件。像这样的事我还是逃不掉。叹息
fork in run := true
javaOptions in (Compile,run) ++= Seq(
"-Dconfig
我遵循了在中添加集成测试的步骤。
但是,当我运行sbt it时,请参见以下内容:
$ sbt it
[info] Loading project definition from myproj/project
[info] Set current project to myproj (in build file:myproj/)
[error] Not a valid command: it
[error] Not a valid project ID: it
[error] Expected ':' (if selecting a configuration)
[error]
I清理了我的~/.ivy2/cache目录。 my project/plugins.sbt文件:
$ cat project/plugins.sbt
// Comment to get more information during initialization
logLevel := Level.Warn
// The Typesafe repository
resolvers += "Local Maven Repository" at "file:///"+Path.userHome.absolutePath+"/.m2/repository
我正在尝试使用sbt程序集构建一个具有Cloudera上游版本的Scala项目。它引发以下异常:
>sbt assembly
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[info] Loading settings for project global-plugins from plugins.sbt ...
[info] Loading global plugins from C:\Users\avi\.sbt\1.0\p
我想在IntelliJ IDEA 14.1中使用SBT。但是,我想从我们公司的内部Nexus服务器下载所有的东西。我在那里创建了两个存储库组,其中包含了一些代理存储库。
我的.sbt/repositories文件如下所示:
[repositories]
local
my-ivy-proxy-releases: http://our-nexus/nexus/content/groups/sbt_ivy_group/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[
在我的应用程序中使用了Neo4j数据库,它的凭据在application.conf文件中定义,该文件存储在Project文件夹/application.conf中。我已经为该项目创建了一个Dockerfile以及Dockerfile文件,并且我希望将neo4j连接URL更改为Dockerfile中的环境参数。如何使用Dockerfile或Dockerfile更改application.conf文件中的字段值?
下面是信任文件的外观:
neo4j{
url= "bolt://localhost:7687"
user = "user"
pas