Building OpenVPMS with Eclipse

These instructions describe how to build OpenVPMS with Eclipse using the m2eclipse plugin.

Installing the m2eclipse plugin

Instructions for installing m2eclipse can be found here: www.sonatype.com/books/m2eclipse-book/reference/installing.html
   
Under "Installing Prerequisites",  only "Subclipse" is need to check out and build OpenVPMS.
Use the Subclipse 1.6 update site: http://subclipse.tigris.org/update_1.6.x instead of the 1.2.x site listed.

Getting the source

OpenVPMS is broken up into several projects and stored in the subversion version control system.

These can be checked out as follows:

1. Select File -> New Project

2. In the Select a wizard dialog, select Maven -> Checkout Maven Projects from SCM.
3. In the Checkout as Maven project from SCM dialog, select svn in the combo box, and enter the SCM URL.

4. Click Finish

The SCM URLs for each project are as follows:

Project SCM URL Description
openvpms svn://svn.openvpms.org/openvpms/openvpms/trunk Parent project. Contains common properties
openvpms-framework svn://svn.openvpms.org/openvpms/framework/trunk OpenVPMS framework
maven-plugins svn://svn.openvpms.org/openvpms/maven/trunk Maven plugins to load archetypes, test data
openvpms-archetypes svn://svn.openvpms.org/openvpms/archetypes/trunk Business rules
openvpms-reports svn://svn.openvpms.org/openvpms/reports/trunk Reporting framework
openvpms-web svn://svn.openvpms.org/openvpms/vpms/trunk Web application
openvpms-etl svn://svn.openvpms.org/openvpms/etl/trunk ETL support
openvpms-release svn://svn.openvpms.org/openvpms/release/trunk Generates release distributions

 

 

 

After checking out the projects, the openvpms-framework, openvpms-reports and openvpms-etl projects need to be updated so that Eclipse can find the sources generated by the castor plugin.

To do this, in Project Explorer, right click on each and select Maven -> Update Project Configuration

 Creating the database schema

This can be done using the hibernate3:hbm2ddl maven goal.

1. Select Run -> Run Configurations -> Maven Build

2. Click New

3. Rename the new configuration to Create Schema

4. For Base directory:, select Browse Workspace... -> openvpms-archetypes

5. For Goals:, enter hibernate3:hbm2ddl

6. Click Run

Loading Archetypes

This is done using the openvpms-archetype:load maven goal.

1. Select Run -> Run Configurations -> Maven Build

2. Click New

3. Rename the new configuration to Load Archetypes

4. For Base directory:, select Browse Workspace... -> openvpms-archetypes

5. For Goals:, enter openvpms-archetype:load

6. Click Run

 

Loading Sample Data

This is done using the openvpms-archetype:load maven goal.

1. Select Run -> Run Configurations -> Maven Build

2. Click New

3. Rename the new configuration to Load Sample Data

4. For Base directory:, select Browse Workspace... -> openvpms-archetypes

5. For Goals:, enter openvpms-data:load

6. Click Run

 

Running the Web Application

The simplest way to deploy the web application is via the embedded Tomcat plugin.

1. Select Run -> Run Configurations -> Maven Build

2. Click New

3. Rename the new configuration to Tomcat

4. For Base directory:, select Browse Workspace... -> openvpms-web

5. For Goals:, enter tomcat:run

6. Click Run

 

The app can be accessed at http://localhost:8080/openvpms/app

Login user name is admin password is admin

Syndicate content