Why I Like Using Gradle in NetBeans IDE (Part 1)
Greetings from Montevideo, Uruguay! My name is Martin Steffen and I use NetBeans IDE in my work as a developer. Also, I use NetBeans IDE in my career as a student. I use NetBeans IDE for all my projects and always have installed the latest NetBeans IDE version (waiting for the new support of HTML5 :) in NetBeans IDE 7.3).
In general, I love to research new technologies and now Gradle is my point of interest. Currently I am developing a web application with Gradle, while using the Gradle Jetty plugin, (https://github.com/martins1930/atfsff/tree/master/Atfsff), and the build.gradle is the following: https://github.com/martins1930/atfsff/blob/master/Atfsff/build.gradle.
The NetBeans Gradle plugin has everything needed to develop this project:
To develop the project with Gradle and NetBeans IDE, I follow the steps below:
- Open the NetBeans Terminal window (Window | Output | Terminal) and run
"gradle jettyRun", as you can see here:
- Right-click the project node in the Projects window and choose "build", as you can
- Go to your browser and see your running application!
- End of development cycle. :)
When I modify JSP pages, and static resources
(HTML/JS/CSS), I don't need to rebuild the project because you
see the changes in the browser
instantly. When I modify a Java class, I only need to
re-build the project (but don't need to stop Jetty), that is, when building the project
Jetty automatically redeploys the app for you.
- static resources (HTML/JS/CSS) are refreshed instantly, as stated above, which makes me feel productive
- redeploying in Jetty when building the project
- the project dependencies are shows in the Projects window
Features I would like the plugin to have:
- Open the browser
when running a project; if it is not
very difficult to implement this would
be good to have.
- Enable version control
when right-clicking a project. The version control is disabled for Gradle
projects as you can see in the second image above, while for Ant projects it is enabled, as you can see below:
- Automatically build a project on saving. In Ant projects, you can check the option
"Compile on Save" as you can see below:
- Glassfish embedded tasks (similar to the Jetty tasks http://gradle.org/docs/current/userguide/jetty_plugin.html), for developing full JavaEE applications, though this feature is more for the Gradle team, perhaps.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)