Automated builds with Netbeans Platform 8.0.2

I've been converting UGS to run on the Netbeans Platform over the past week, and in general its been great.  The features and documentation I used while migrating UGS away from Swing were very well done. So aside from a couple hiccups, the Netbeans Platform has been great. Until a few days ago when I decided it was time to integrate my new changes with my Jenkins CI server.

It turns out that you can't build a Netbeans Platform application without connecting to the Netbeans IDE first. This has to do with the extra modules, platform components and build harness. Searching the subject online provides a lot of documentation, everything I've found is either out dated, contradictory, or I could only get it working with a new project and not my existing one.

The final solution was so simple, and minimally invasive that I wanted to create this blog post.

There are 4 interesting files for a Netbeans Platform build:
build.xml - Some documentation suggests adding a download-netbeans-rcp target here. That isn't needed. If you have a custom target you can put it here, otherwise there is no need to modify this file.
nbproject/build-impl.xml - This is loaded by build.xml, don't modify this file.
nbproject/ - This file seems to identify your modules and the applications name, no need to modify this file either.
nbproject/ - Modify this file!
The Netbeans Platform has facilities built into its build script to download all required files. is where you need to specify what it should download.
# These are used later in the build script${suite.dir}/latestStableBuild
# Provide some URLs
Thats it! It probably took me 5+ hours to find that. Now I can run "ant build-zip" on my Jenkins server and get a zip archive in return.


  1. Is it possible to incorporate a maven build of a netbeans platform application with jenkins?

  2. Yes you can build a netbeans platform application from the command line with Maven as well. I believe "mvn package" will create a universal zip file that you could deploy. The installers can be built with "mvn package -P deployment"


Post a Comment

Popular posts from this blog

Decommissioning the cloud: A self-hosted future

Taking Stuff Apart: Realistic Modulette-8

Using a JFileChooser to browse AWS S3