How to use NetBeans to write Groovy scripts
Posted May 08, 2013 by Giampiero Granatella
In this post we are going to see how to develop applications using NetBeans and Portofino 4. The traditional development of a web application in NetBeans requires the creation of a web project and its deployment on an application server such as Tomcat. This is certainly possible even with Portofino, but it has two drawbacks: first redeployment is slow and second this life cycle loses the capability of Groovy scripts to be edited on live systems.
In this post we propose the idea to create a project that points to the web application running under Tomcat. Therefore we can harness the power of the IDE and to maintain the capability to make changes on the live system without redeploy.
Why use an IDE? Portofino can be managed only through a browser and, optionally, with a text editor. But the use of an IDE such as NetBeans, facilitates to create and edit xml pages, jsp and groovy scripts. With NetBeans we can debug Groovy scripts, browse and search classes, have syntax highlighting, auto-completion, import and automatic functions refactoring. Compared to the previous post about Eclipse and IntelliJ Idea, NetBeans does not offer remote debugging of Groovy scripts.
In this post we saw how to configure Netbeans to develop web applications in Portofino. Unlike Eclipse or IntelliJ Idea, it is not possible to use remote debugging of Groovy scripts.