查看SBT发出的确切Java命令 [英] View exact java commands issued by SBT

查看:239
本文介绍了查看SBT发出的确切Java命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将jrebel与SBT项目集成在一起.以下条目位于build.scala文件中:

I'm trying to integrate jrebel with an SBT project. The following entry is in the build.scala file:

javaOptions ++= Seq("-javaagent:/path/to/jrebel.jar", "-Drebel.log=true", "-Drebel.log.file=/path/to/jrebel.log")

但是,启动SBT时(或者,当文件更新时)我没有看到任何Jrebel输出,所以我想知道是否有一个SBT命令/开关可以用来显示SBT发出的确切Java命令? (也许是版本格式上的差异?我使用的是SBT版本0.12.2)

However, I'm not seeing any Jrebel output when SBT is started (or, for that matter, when files are updated) so I'd like to know if there is an SBT command/switch that can used to display the exact java commands that SBT is issuing? (maybe it's a versioning-format difference? I'm using SBT version 0.12.2)

推荐答案

您做了一些奇怪的事情.

You did something strange.

如果希望将jrebel添加到SBT,则必须在调用sbt-launch.jar的命令中添加javaagent参数,也不要忘记属性文件. ???您的Build.scala太大了吗?不可思议.

If you wish to add jrebel to SBT you must add javaagent parameter to your command that invoke sbt-launch.jar Also don't forget properties file. ??? Your Build.scala is so huge? Incredible.

如果要向Scala应用程序中添加jrebel,则SBT根本不在范围内.只要在某个地方启动您的应用程序,它就会重新加载重新编译的类.您只需要指定编译的类文件的位置即可.然后使用sbt>〜package-bin.就像maven,ant或任何其他构建系统一样.

If you with to add jrebel to Scala application then SBT out of scope at all. Just start you app somewhere and it will reload recompiled classes. You need only specify where compiled class files is located. Then use sbt > ~package-bin. It is like maven, ant or any other build system.

IMHO javaOptions仅影响派生jvm的特定任务-如编译,测试等.

IMHO javaOptions affect only specific tasks that fork jvm - like compilation, tests and so on.

这篇关于查看SBT发出的确切Java命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆