...
- Netbeans IDE with Web & Java EE Bundle (Tutorial uses v6.1)
- SVN client (optional, but recommended for easy checkout and commit of code)
- Hibernate Support plugin (optional)
- Spring Framework Integration (optional)
The above plugins can be installed from the Plugins Manager found under
...
- Tool->Plugins. You can also check that the Base IDE already has the Subversion Support Installed. You just need a Subversion Client.
...
Steps to work on OpenMRS
...
1.7 and older (non-mavenized codebase of OpenMRS) using Netbeans
You can starting working with OpenMRS in Netbeans in 2 different ways. You can create a new project with existing source code or you can use the Eclipse Project Importer plugin for Netbeans. The use of Eclipse Project Importer is NOT recommended because firstly you need to download the plugin (isn't part of Base IDE), secondly . Secondly you need a working Eclipse workspace (created when using Eclipse) where you have opened the openmrs project and lastly . Lastly it does not give you fine control over what you want to work with.
Getting the OpenMRS Source
...
Code
If you have installed the SVN client from the above link, then you can download the source code from OpenMRS's SVN servers. Click On: Versioning>Subversionh1. Versioning->Subversion->Checkout. This will open the Checkout window as shown below:
Enter the Repository URL as shown in the image for checking out the openmrs source code. For modules sources, you can use: http://svn.openmrs.org/openmrs-modules. The username & password can be left blank for anonymous checkout or you can enter your user/pass so that commit is easier.
The next screen will allow you to checkout specific folders, like trunk, branch etc. Specify a Local Folder, where you wish to store the downloaded sources.!SVN-Folders.jpg!Steps to work on OpenMRS using Netbeansh1. h2.
Create New Project
- Once you have the source code, you want to create a new project. File>New File->New Project (Ctrl+Shift+N)... and then Webh1. Web->Web Free-Form Project
Select Source Location
- Select location of the source folder. Selecting the correct location will automatically fill the other fields in the dialog by parsing through the ant script (build.xml).
Mapping Ant Targets
- The next screen automatically detects the various targets from the ant script. You can map the IDE functions to targets from the ant script. You can map the functions from the drop-downs like shown in the screenshot below:
Select Web Sources
- The web sources are automatically selected or you can select as shown in the screenshot
Select Source Files
- The source packages for OpenMRS are located inside the src\api and src\web whereas the tests are located inside test\api and test\web
Source Classpath
Selecting the Java Sources Classpath is an important step and Netbeans doesn't understand libraries automatically. Thus, each Source Package folder will need the libraries. This can be a long procedure, but editing the *project.xml file inside nbproject folder makes the process less tedious. But we will do this after the project is created. For the time being, just add the libraries to one source package from the dropdown.
After you have set the sources classpath, you just have to click next on the Project Output. Click Finish on the web sources classpath which already has the Java Sources Classpath. After you click the Finish, a Netbeans project is created and a folder named nbproject is added the checked out source.
...