Netbeans IDE

Authors Steve Climans, Bsimons

September 14th 2006

This document provides a detailed description of the steps required to install and build the Indivo source code on a Microsoft Windows platform using an open source graphical integrated development environment. Intended as a gentle introduction, more experienced developers may need only skim portions of the document. Note that although this document has been written primarily for Microsoft Windows users, the concepts transfer easily to both Linux and Mac OS.

Why a graphical development environment
A graphical integrated development environment (IDE) can be used to develop and build the Indivo source. A number of developers grow to prefer the feature set of an environment that allows for color coded syntax highlighting, code completion and integrated edit, build and deploy environments.

Of the many products available from both open source and commercial vendors, the choice of which IDE to use is often a personal one. For this HOWTO, the open source IDE NetBeans will be used. The choice of this tool was based on the feature set provided and the advanced support for seamlessly integrating the Maven2 build system used by Indivo.

This document will build upon the document [HOW-TO Create and Operate a Command Line Toolchain for Indivo Development under Microsoft Windows]. By first following the steps in that document to create a command line toolchain, the necessary foundation will be in place to add the NetBeans IDE.

Reporting errata
Email the users list. To send an email to the list, you must be subscribed. You can subscribe here.

Typographic conventions used in the document
To indicate code typed into the command line, a  will be used.

Notice and Disclaimers

 * 1) This document was accurate as at September 14th, 2006 when applied to the Indivo build ping-3.0-beta.
 * 2) Agreement and compliance with license terms of the various components mentioned in this HOWTO is at the sole discretion of the user.
 * 3) All trademarks are the property of their respective owners.

Document Objective

 * Install and verify the correct operation of the necessary software development tools
 * Download the latest source code from the public Indivo repository
 * Perform a successful build within the IDE of the Indivo source code on the local machine.

Intended Audience

 * Assumed Developer Proficiency
 * The intent of this document is to be inclusive and accessible to a wide range of developers.  More experienced Java developers will likely skip segments of this document.
 * Platform Knowledge
 * Basic knowledge of the Windows operating system is assumed.
 * Tool Knowledge
 * Minimal knowledge of the Java, Maven and Subversion toolsets are assumed.
 * Preconditions
 * An installed and operational copy of Windows XP Professional.
 * A logged on user with local Administrator access
 * Internet access to download required software and source code

Verify the Java Development Kit has been installed
From the Windows Start button on the menu, select the Run menu item. Into the dialog box, enter the command  and press the Ok button. This will open a command window with a shell prompt

At the prompt, enter the command

The following result should be displayed:

Verify the Maven Build Environment has been installed
From within the open command window, enter the command: You should see the response as indicated:

Download the NetBeans Version 5.5 Beta
The NetBeans IDE version 5.5, Beta 2 will be used. From within a browser of your choice, navigate to Netbeans.org and browse to the download section. Select the download of the NetBeans IDE 5.5 Beta 2 Installer and indicate your agreement to the required license terms if acceptable.

At the time of writing, the offline installation option download option is a file named netbeans-5_5-beta2-windows.exe

Install and Configure
As a user with Administrator privileges, run the downloaded executable, accepting all defaults in accordance with the license terms if acceptable. More detailed installation instructions are provided by NetBeans at Netbeans 5.5 Install Notes

Verify
From either the Windows Start menu or the desktop shortcut, launch the NetBeans program. The NetBeans IDE should be displayed.

Download
Codehaus.org provides the Mevenide2-Netbeans plug-in under the Apache open source license, which integrates Maven2 support into the NetBeans IDE. Download the latest copy from Codehaus at: Meven IDE 2.2

Install and Configure
Detailed installation instructions are provided by Codehaus at Meven IDE instructions. Follow these steps to install the plug-in within NetBeans.

Verify
Once completed, you will be prompted to restart the NetBeans IDE to complete the installation. After the restart, open a new project using the NetBeans menu:

The Maven2 Category should appear in the list of the available project types:



Download
The NetBeans Beta 5.5 is the first release to provide native Subversion repository support, but this is not installed by default. To install this plug-in, select the Update Center option from the Tools menu:



A dialog window will prompt for the selection of the NetBeans 5.5 Beta Update Center checkbox. Select the checkbox and press the Next button:



The next dialog window will present all the updates available for installation into the NetBeans IDE. Select the Subversion feature and press the Add button.



This will include the needed components. Press the Next button.



NetBeans will prompt for acceptance of the license terms of the components, and if accepted, will proceed to download the needed code. When complete, press the Next button.



The last step is to accept the certificates attached to the code. Ensure these are checked and press the Finish button:



Install and Configure
The installation and configuration were completed in the steps outlined above.

Verify
Once installation is complete, the Subversion menu item will appear in the top line menu:



Download the Latest Indivo Source Code
To download the latest Indivo source code, select the Subversion Checkout menu item:



Enter the following as the repository URL:



The first time the repository is accessed, a window will display asking to confirm the repository server certificate. In this case, select the button to Accept permanently.



The next screen will display the dialog to select the version and the location of the checked out files. When complete, press the Finish button.



At this point, the checkout will commence and may take some time given the size of the Indivo repository. Once complete, the dialog will confirm the number of projects download and prompt to open a project, select Open project



The next dialog requests to open the project folder. Highlight the ping-beta-3.0 and press the Open Project Folder button.



Within the project tab of the NetBeans workspace, the Ping project appears, properly identified as a Maven2 project. The POM (Project Object Model) is the master Maven build configuration. For more information on the POM, see the following article:

POM



Maven is based upon the central concept of a build lifecycle with a number of predefined targets. These targets will be predictable across any Maven build configuration.

The validate target will ensure the project is correct and all necessary information is available. For further information on the available Maven targets, see the following link:

Introduction to the Lifecycle



Selecting the validate target will display the following dialog box. Accept the defaults presented.



Upon a successful validation, the Output window of the IDE will appear as follows:



At this point, repeat the above steps to perform a Maven compile.





During the compile, there may be missing dependencies that have been specified in the POM but are not available locally. In this case, there will be a delay while the missing resource is downloaded automatically.

Upon a successful compile, the Output window of the IDE will appear as follows:



If this screen shows anything other than BUILD SUCCESSFUL, please post a message to the Indivo forums to resolve the error.

Glossary of Terms
 * IDE - Integrated Development Environment, often a graphic environment used to edit and build source code.
 * JDK - The Java Development Kit provided by Sun Microsystems used to compile Java programs.
 * JRE - The Java Runtime Environment provided by Sun Microsystems used to run already compiled Java programs. For the purposes of building Indivo from source code, the JRE alone is not sufficient.
 * Toolchain - A toolchain is a series of programs that work in conjunction to accomplish the building of the Indivo source into an application.