Play Framework 2.0 doesn't seem to have much / any support for Netbeans. I'm currently just using it as an editor (loading the files using the favorites tab), but it's a little frustrating that Netbeans doesn't recognise any of the libraries / api's.
This means that EVERYTHING is underlined in red.
Trying to create a free-form project requires a build file, so I get stuck there too.
Any ideas appreciated...
Take a look at play2-maven-plugin which provides a nice mavenized interface to the Play/SBT/Ivy universe. One small pom.xml then lets you leverage all of NetBeans' Maven goodness to get rid of those red underlines...
There is no native support for Netbeans at this time.
Check Play 2.0 IDE documentation for Netbeans section.
There are also some suggestions of workaround in the Google Groups topic
Use the eclipse support to generate an eclipse project and then import that into NetBeans
NetBeans now has Native Support for Play Framework 2.3.x and above: http://nbpleasureplugin.com/documentation/installation.html No Command line needed at all.
The most important features are:
Note: I created this plugin.
play eclipsify
to create an eclipse project.File > Import Project > Eclipse Project
Import Projects Ignoring Dependencies
Project to Import
, insert the root of your play application.Destination Folder
, also insert the root of your play application.Finish
.The following works for Play 2.4 and NetBeans 8.0.2. Posting here since this question shows up in search results regardless of Play version and the official documentation is too brief and does not provide specific steps.
Pre-requisites: activator (tested with 1.3.5), NetBeans with all scala-related available plugins installed (in my case this included nbscala mentioned in Play docs, but not nbsbt).
[from nbsbt README] Or else you can just create a separate
netbeans.sbt
file next toplugins.sbt
and add to.gitignore
if you prefer to separate IDE-specific config from the rest of the project.On command line go to the project root and run activator specifying that you want to create a netbeans configuration:
$ cd PROJECT_DIR
$ activator netbeans
Running activator will first resolve all the dependencies (including nbsbt) and then create NetBeans files. I you should see
.classpath_nb
file in the root as a result of this command.Finally, just go to NetBeans and simply do File > Open Project...