What is the difference between command:
sbt run
and
play run
I am using starter java project:
play-java-starter-example
play framework projects used "activator" to run application
https://www.lightbend.com/community/core-tools/activator-and-sbt
But "activator" is dead on May 24, 2017. Old activator project templates are recommend to migrate to "giter8" templates.
You should to use "sbt" instead of "activator" now.
Related
How to integrate play framework with scala IDE ?
I have already created project with command
sbt new playframework/play-scala-seed.g8 as suggested on official site https://www.playframework.com/getting-started and then imported project to scala IDE .
Which file in project has to run ? and how to run it in IDE.
I can not open index.scala.html
I got a answer whenever you create project through command play new newApp.
Then go to that project folder(cd newApp) and add eclipse dependency by command play eclipse .
then import that project into Scala IDE.
I want to setup a Spark-Scala-Sbt dev environment on Ubuntu
So i have installed SBT, Scala Seperately before installing IntelliJ.
But after installing intelliJ i have installed the sbt plugin for intelliJ as well.
Now how to avoid conflicts between the 2 sbt's which one to use and how to setup properly to avoid conflict.
Also wanted to know HOW .. the installed Scala & SBT is different from the scala & sbt plugin that comes with itelliJ IDEA
The standalone sbt plugin is obsolete with IntelliJ Scala Plugin 2017.1, which includes an integrated sbt shell and supports building through that shell.
To avoid any conflicts between different instances of sbt shells, it is best to have only one running at a time - either from the terminal or from IDEA. Other than that you don't need any special setup.
I installed IDEA version 15 with the Scala plugin, but Play projects are enabled only in the Ultimate edition. I'm new to Scala and Play, any issues if I run Play outside of IDEA? Would Play "hot deploy" any changes I make in scala source code?
Just open it as an SBT project and it's fine.
This is how it works: (1) create a project using play/activator, (2) open IntelliJ and import as SBT project (accept all defaults), (3) run the project in a command line (externally to IntelliJ), (4) edit project source files in IntelliJ - when you update a file, it is automatically compiled (you can see that refreshing the url localhost:9000)
Play works great outside of IntelliJ. I have developed play applications using Sublime Text and Atom. You'll get the errors in the console, or in the web application itself.
There's also a NetBeans plugin now (http://nbpleasureplugin.com), and the official ScalaIDE should also support it (although I've never tried using it).
I have followed the Play tutorial to create a simple application, made sure it started using the "play" command and then running play eclipse I generated the eclipse project files. I finally imported the project into the latest version of Scala IDE bundle for OSX.
I would like to know if there is a way to run my application from within eclipse without having to use the shell to start play each time.
There is a similar question here, and the accepted answer says that a run configuration will be created in eclipse. In my case I can't see any, so that may have changed from version to version.
The short answer is no. You need to start the play server from command line if you want to load your application on a browser.
The long answer is that we (I'm a contributor to the Scala IDE project) are starting to work on sbt integration, which is the required building block for not having to run the play console on a terminal (because we can to do it for you in the background, once we have sbt support). My suggestion is to star the project I linked, and follow developments.
I am working on a Scala library in Eclipse (proj1).
This library I would like to test in a Play 2.0 Scala web app.
So I have run the eclipse command from the cmd line and imported the project into Eclipse (proj2).
So I have two eclipse projects side by side. I can add the first project (proj1) to the build path of proj2 in Eclipse.
This way I can import the library and write the code.
But when Play compiles it can't see library I've added to the build path.
If I run the eclipse command again the library is removed from the build path.
Is there any way to reference the project? I would prefer not to build a jar and import that via sbt.
I simply add them via sbt and regenerate the eclipse project from the Play console.