Geertjan's Blog

  • October 28, 2012

Play Framework Plugin for NetBeans IDE (Part 2)

Geertjan Wielenga
Product Manager

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 java.net name, and then I'll add you to the project on java.net, where I very much look forward to your contributions:


Join the discussion

Comments ( 14 )
  • Yann Sunday, October 28, 2012

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

  • guest Monday, October 29, 2012

    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.

  • Geertjan Monday, October 29, 2012

    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?

  • guest Monday, October 29, 2012

    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.

  • Geertjan Monday, October 29, 2012

    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.

  • hanynowsky Monday, October 29, 2012

    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.

  • William Monday, November 19, 2012

    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?

  • guest Wednesday, December 12, 2012

    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 JavaPlayProjectProject.zip.

    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.

  • jadhav Saturday, January 12, 2013

    Hi, Sir Thanks for this Plugin.

  • guest Saturday, March 9, 2013

    How do I install this plugin?

  • Geertjan Saturday, March 9, 2013

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


  • Persian Golf Saturday, May 4, 2013

    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 ::

    :::: WARNINGS

    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

  • michael Wednesday, August 14, 2013

    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.

  • Jagwire Tuesday, June 24, 2014

    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?

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.