Scala Play 2.3 InteliJ 14 *community edition - is it possible to run project without cmd line activator command

孤人 提交于 2019-12-22 06:47:52

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/27796624/scala-play-2-3-intelij-14-community-edition-is-it-possible-to-run-project-wit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!