Scala Play 2.3 InteliJ 14 *社区版 - 是可以运行项目没有cmd线激活命令 [英] Scala Play 2.3 InteliJ 14 *community edition - is it possible to run project without cmd line activator command

查看:169
本文介绍了Scala Play 2.3 InteliJ 14 *社区版 - 是可以运行项目没有cmd线激活命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://博客。 jetbrains.com/scala/2012/12/28/a-new-way-to-compile/ 我知道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 7 Play framework 2.3.4 SBT 0.13.1 InteliJ 14 (community edition)

Thanks Brent

解决方案

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线激活命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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