Why I Like Using Gradle in NetBeans IDE (Part 1)

DZone 's Guide to

Why I Like Using Gradle in NetBeans IDE (Part 1)

To develop the project with Gradle and NetBeans IDE, I follow the steps below.

· Java Zone ·
Free Resource

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 developinga web application withGradle, 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 neededto develop this project:


To develop the project with Gradle and NetBeans IDE, I follow the steps below:

  1. Open the NetBeans Terminal window (Window | Output | Terminal) and run "gradle jettyRun", as you can see here:

  2. Right-click the project node in the Projects window and choose "build", as you can see here:

  3. Go to your browser and see your running application!
  4. 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 seethe changesin thebrowserinstantly. 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.

Interesting features:

  • static resources (HTML/JS/CSS) are refreshed instantly, as stated above, which makes me feelproductive
  • 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; ifit is not verydifficult to implementthiswould begood 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.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}