Google AppEngine on Netbeans 8

Even though Google does not officially support Netbeans IDE, it is still possible to develop Google App Engine applications with Netbeans 8.

This article originally appeared on https://techtavern.wordpress.com

There has been a Netbeans plugin for Google App Engine hosted at Kenai, which seems to have been left on its own since June 2009. Fortunately, the project was forked by Gaelyk and who updated the plugin for Netbeans 7.4. I was pleased to confirm that his plugin also works for Netbeans 8.0 and for Google App Engine 1.9.x. And I assure that it work better than that dumb Eclipse Web Tools Platform.

  1. Download the zipped file for Netbeans 7.4 from the Gaelyk download page.
  2. Extract the zip file into some directory.
  3. In Netbeans 8.0, follow to menu “Tools”, “Plugins”. And within the dialog, to “Downloaded” tab. Click “Add Plugin” and browse to the folder.
  4. Select all .nbm files and confirm.
  5. Watch out, don’t close the dialog! Instead, click on the small “Install” button at the left bottom corner.
  6. Go through the Wizard, confirm license, confirm “plugins not signed” warning and go on.
  7. Now you may close the dialog.
  8. Restart Netbeans.

Now, its time to configure the Google App Engine server.

  1. Open the “Services” window.
  2. Right click the “Servers” entry, select “Add server”.
  3. Go through the Wizard, select “Google App Engine”, browser to the directory where you previously unzipped it,  confirm ports and DataNucleus.

Everything is ready: create a new “Java Web”, “Web Application” projects. It will produce a projects that compiles using a standard Netbeans Ant build.

The Netbeans Appengine plugin is not compatible with newest Google Appengine Java SDK anymore. See this article for an workaround.

 

Git Ignore file for Netbeans RCP projects

This article suggest a .gitignore file for GIT repositories that keep Netbeans RCP suite and module projects.

For short:

nbproject/private/
build/
dist/

As explained:

  • nbproject/private/ Matches the local, per-user configuration directories, which are suite/nbproject/private for suites and module/nbproject/private for module projects.
  • build/ Matches the module/build and suite/build directories. Modules store their compiled classes within the module/build directory. Suites write shareable artifacts into the module/build directory.
  • dist/ Matches the suite/dist directories, where suites store distributable artifacts like installation programs and java webstart.

If you prefer Eclipse EGit, then add following lines:

private
.project

As explained:

  • /.project Matches the file created by Eclipse EGit to locally mark the repository as an importable general Eclipse project. This enables Eclipse EGit as your favorite Git client.
  • According to Git man files, the specification of ignored directories could be prepended with **/, which did not work for Eclipse EGit (a known bug). Therefore, I tell EGit to ignore every directory name private, which is not as accurate as the rule nbproject/private.