NetBeans Platform Application Developer and Architect living in Gauteng, South Africa. Member of the NetBeans Dream Team, and community elected member of the 20th NetBeans Governance Board. Hermien has posted 10 posts at DZone. You can read more from them at their website. View Full User Profile

On the NetBeans Platform Build System (Part 1)

  • submit to reddit

The NetBeans build harness performs a number of tasks when building a NetBeans Platform application. This series of articles describes some of the issues that can be encountered when building NetBeans Platform applications in other ways than the standard use case of creating and building it on a single PC in the NetBeans IDE. It also provides some tips for customising build behaviour.

1. Introduction

The NetBeans Platform ships with a comprehensive build harness, containing build scripts and Ant tasks that make the building of a platform application very easy. Since it consists of ant scripts, it can be used to build the application from the IDE or the command line. Most of the time the build harness does its job so well that the NetBeans Platform application developer is only vaguely aware of its existence. However, there are instances where you need something just slightly different. And that is what this series of articles is all about!

The series focuses on the build process of a NetBeans Platform application, which has a different structure from a plain Java application project or a web application project. At the time of writing this article, I was using NetBeans IDE 6.7.1, but still had 6.5 and even some older versions installed.

2. Managing Multiple Platforms in the IDE

When you first install NetBeans IDE, a folder is created for that version. For example, version 6.5 would (by default) have been installed to C:\Program Files\NetBeans 6.5. A few months later, version 6.7.1 is released and you install the second version with its own folder. It is now possible to build on top of either of the two platforms. On the Tools menu, you will find a NetBeans Platforms option, which opens up the NetBeans Platforms Manager window shown below.

NetBeans Platform Manager

Figure 1. NetBeans Platform Manager.

Here you can configure multiple platforms, allowing you to choose which platform to use when building a suite and/or modules. Note that that 6.7.1 platform is the default, and that it uses the harness supplied with the IDE. For the 6.5 platform, you could choose to rather use the one supplied with the platform, i.e. the 6.5 one.

Keep in mind that the harness uses Ant, and was running perfectly well with the version of Ant that was included with the release. However, years down the line, some Ant tasks might not exist anymore and hence a very old harness may not run entirely as expected with a much later version of the IDE.

Next Time: "The Project, the User Folder and the Build Harness"



netbeans-platform-build-system-1-build4.png35.33 KB
Published at DZone with permission of its author, Hermien Pellissier.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Varun Nischal replied on Fri, 2010/02/12 - 1:59pm

I wrote a blog entry on "Managing NetBeans Platforms", have a look that might help..

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.