Play Framework Plugin for NetBeans IDE (Part 2)

After I published part 1 of this series, the first external contribution (i.e., not by me) to the NetBeans plugin for Play Framework 2 was committed today.

Yann D'Isanto added support for creating new Play projects:

That completely solves a problem I was working on, in a different way altogether. I was working on creating a new wizard that would call "play new" on the command line and pass into the command line the entered name and application type (1 for Java and 2 for Scala). However, Yann's solution is better, at least in the sense in that it works, as opposed to mine which didn't, because of problems I continually had with the command line, since one needs to press Enter multiple times on the Play command line when creating new projects, which I wasn't able to simulate in my new wizard. Yann's approach is simply to follow the approach taken in the Project Type Module Tutorial, which explains how to register a project sample in the IDE.

I was inspired by Yann's contribution, especially when he mentioned that one needs to build Play projects on the command line. So, I added a new menu item on the right-click of a project for building Play projects, which simply passes "play compile" to the command line for the current project:

Via the IDE's main menu bar, you can also Build and Run the application, though the code for the Clean function needs to be added still, which would be a cool thing for anyone out there to add, by using all the existing code and then passing "play clean compile" to the command line.

Something else that Yann added is an Options Window extension, thanks to the Options Window Module Tutorial, for registering the Play installation, which is a step forward from my hard coded solution. I changed things slightly so that, when Build or Run are selected, without a Play installation being defined, the Options window opens, displaying the tab that Yann created, shown below. Notice that there's no Browse button, which would be a simple next step for anyone else to contribute. A small tip is to use the FileChooserBuilder from the NetBeans IDE APIs when working on the Browse button:

Looking forward to more contributions to the Play Framework 2 plugin for NetBeans IDE. Just leave a message here with your ideas, with your name, and then I'll add you to the project on, where I very much look forward to your contributions:


I just added the browse button in the options panel ;-)

Posted by Yann on October 28, 2012 at 03:09 PM PDT #

Great, now we only need oracle to acknowledge that scala is much more used than groovy and start giving it official support, instead of groovy.

Posted by guest on October 29, 2012 at 12:49 PM PDT #

Hmmm. I'd be very much against that, guest. I like Groovy a lot. Why should it be either Groovy or Scala? Why not both?

Posted by Geertjan on October 29, 2012 at 01:04 PM PDT #

I've nothing personal against Groovy, is just that if they both could get support, then they would be getting it by now, no?, so I guess they only have budget/intention/time/spirit to support one. And I do consider Scala much more high end/profile than Groovy.

Posted by guest on October 29, 2012 at 01:53 PM PDT #

You're saying that a choice needs to be made between support for Scala and support for Groovy. And that the fact that there is support for Groovy means that there's no support for Scala. It all just seems very strange logic. Anyway, back to work for me. If you'd like to contribute to the Play Framework support for NetBeans IDE, let me know.

Posted by Geertjan on October 29, 2012 at 02:56 PM PDT #

That's great news. I have been looking forward for Netbeans IDE support. PlayFraemWork is no doubt a great one.
By the way. Groovy and Scala should be both supported.

Posted by hanynowsky on October 29, 2012 at 03:42 PM PDT #

How to add extra Java libraries to the plugin so that the IDE can recognize new libraries, such as Jackson JSON library or MongoDB Java drivers?

Posted by William on November 18, 2012 at 09:58 PM PST #

Hi, thx for this plugin. I'm using Play 2.1 RC1 and sbt is now in version 0.12. I make in a terminal a new play2 project named "play-project and i zip the content in an archive named
I put the zip in nbplay/src/main/resources/org/netbeans/play/samples/java/ (overwrite existing file)

Run a clean package an import the result in NB 7.3. Now the plugin work fine with my Play 2.1 RC1 ;)

Hope will help and sorry for my poor english.

Posted by guest on December 12, 2012 at 02:44 PM PST #

Hi, Sir Thanks for this Plugin.

Posted by jadhav on January 11, 2013 at 07:35 PM PST #

How do I install this plugin?

Posted by guest on March 09, 2013 at 05:32 AM PST #

Install the plugin into NetBeans IDE 7.3 after downloading it from the Plugin Portal:

Posted by Geertjan on March 09, 2013 at 07:26 AM PST #

this plug in trying to resolve dependencies with maven repository.
But there is only 404 error!

My netbeans log is: >>>>>>>>

Getting org.scala-sbt sbt 0.11.3 ...

:: problems summary ::
module not found: org.scala-sbt#sbt;0.11.3

==== local: tried


==== Maven2 Local: tried


==== typesafe-ivy-releases: tried

==== Maven Central: tried




:: org.scala-sbt#sbt;0.11.3: not found


unresolved dependency: org.scala-sbt#sbt;0.11.3: not found
Error during sbt execution: Error retrieving required libraries
(see /home/mohsen/playFramework/play-2.1.1/framework/sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 0.11.3

Posted by Persian Golf on May 04, 2013 at 07:33 AM PDT #

concerning the dependency error I found following hint which worked for me (play 2.1.3)

I have another question: How do I debug a project created with this plugin and play 2.1.3? I only have the option "run" to start it.

Posted by michael on August 14, 2013 at 03:59 PM PDT #

I don't see this plugin available for Netbeans 8. What needs to be done in order to make the plugin compatible with the newest version of Netbeans? Maybe I can help?

Posted by Jagwire on June 24, 2014 at 06:09 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« August 2016