问题描述
从我知道Intellij正在使用sbt来构建 - 这样1x构建
目前我运行一个单独的命令行任务来运行我的项目 -
./ activator -jvm- debug 5000 -Dhttp.port = 9000
因此,每个代码更改被编译两次(一次由InteliJ;一次由激活器)
当我运行时,有没有办法使用InteliJ构建工件,所以代码只编译一次?
正在使用InteliJ中的终端窗口与正常终端窗口不同?
我在的版本是:
Java 7
Play framework 2.3.4
SBT 0.13.1
InteliJ 14(社区版)
感谢
Brent
安装 Play 2.x 插件(带依赖关系)并添加播放2专用的投放配置( note 菜单> 运行
strong>> 修改配置... > 添加新配置(右侧加号图标)> 播放2应用保存后,您将能够在IntelliJ中运行您的应用程序(也可以通过
菜单> 运行> 调试您的项目
btw,
From http://blog.jetbrains.com/scala/2012/12/28/a-new-way-to-compile/ I understand that Intellij is using sbt to build - so thats 1x build
At the moment I run a separate command line task to run my project -
./activator -jvm-debug 5000 -Dhttp.port=9000
So each code change gets compiled twice (once by InteliJ; once by activator)
Is there a way to use the InteliJ build artifacts when I run, so the code is only compiled once?
Is using the Terminal window in InteliJ any different from a normal terminal window?
The versions I'm at are:
Java 7Play framework 2.3.4SBT 0.13.1InteliJ 14 (community edition)
ThanksBrent
Yes it's definitelly possible.
Install Play 2.x plugin (with dependencies) and add the run configuration dedicated for Play 2 (note in Intellij 14 Play2 support is combined within the Scala plugin)
Menu > Run > Edit configurations... > Add new configuration (plus icon in the corner) > Play 2 App
After saving you will be able to run your app (also in debug mode) within IntelliJ - i.e. via
Menu > Run > Debug 'Your Project'
btw, you can remove Make (before launch) from there, SBT should handle builds properly without Idea's support
See sample shot
这篇关于Scala Play 2.3 InteliJ 14 *社区版 - 是可以运行项目没有cmd线激活命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!