Getting started with OpenVPMS

Overview

The purpose of this document is to outline the requirements for getting the OpenVPMS webapp up and running.

Tools

(Your mileage may vary with different database versions)

Setting up MySQL

MySQL Server

When configuring the MySQL server:

  • the InnoDB storage engine should be used.
  • UTF8 should be the default character set.

These have the corresponding settings my.ini:

default-character-set=utf8
default-storage-engine=INNODB

Creating the database

Create a database named openvpms, with a single user openvpms:

mysql -u root -p
mysql> create database openvpms;
mysql> grant all on openvpms.* to openvpms identified by 'openvpms';

Getting the Source

To get the most recent sources from SVN:

mvn scm:checkout -DconnectionUrl=scm:svn:svn://svn.openvpms.org/openvpms/openvpms/trunk -DcheckoutDirectory=openvpms
mvn scm:checkout -DconnectionUrl=scm:svn:svn://svn.openvpms.org/openvpms/framework/trunk -DcheckoutDirectory=openvpms-framework
mvn scm:checkout -DconnectionUrl=scm:svn:svn://svn.openvpms.org/openvpms/maven/trunk -DcheckoutDirectory=maven-plugins
mvn scm:checkout -DconnectionUrl=scm:svn:svn://svn.openvpms.org/openvpms/archetypes/trunk -DcheckoutDirectory=openvpms-archetypes
mvn scm:checkout -DconnectionUrl=scm:svn:svn://svn.openvpms.org/openvpms/reports/trunk -DcheckoutDirectory=openvpms-reports 
mvn scm:checkout -DconnectionUrl=scm:svn:svn://svn.openvpms.org/openvpms/vpms/trunk -DcheckoutDirectory=openvpms-web 
mvn scm:checkout -DconnectionUrl=scm:svn:svn://svn.openvpms.org/openvpms/etl/trunk -DcheckoutDirectory=openvpms-etl
mvn scm:checkout -DconnectionUrl=scm:svn:svn://svn.openvpms.org/openvpms/release/trunk -DcheckoutDirectory=openvpms-release

Building the Sources

The easiest way to build the sources is to simply run:

> cd openvpms
> mvn -Dmaven.test.skip install

This may take a while, and will also drop and create the database schema as part of the openvpms-release build. A faster approach is to run only build those projects required for the web application:

> cd openvpms-framework
> mvn -Dmaven.test.skip install
> cd ../maven-plugins
> mvn -Dmaven.test.skip install
> cd ../openvpms-archetypes
> mvn -Dmaven.test.skip install
> cd ../openvpms-reports
> mvn -Dmaven.test.skip install
> cd ../openvpms-web
> mvn -Dmaven.test.skip install

Creating the database schema

To create the database schema:

> cd openvpms-archetypes
> mvn hibernate3:hbm2ddl

 

Warning!!

This will drop and recreate any existing tables

To load the database with data, now run:

> mvn openvpms-archetype:load openvpms-data:load

Building and deploying the webapp

> cd openvpms-vpms
> mvn -Dmaven.test.skip tomcat:run

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

Login user name is admin password is admin

 

 

Comments

Comment viewing options

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

Build steps failed

 When I tried the steps to build the individual projects it failed, because openvpms-report-maven-plugin (in maven-plugins) depends on openvpms-reports, which depends on openvpms-archetypes. Also, openvpms-archetypes depends on maven-plugins, which is circular. Therefore, the correct order should be:

> cd openvpms-framework
> mvn -Dmaven.test.skip install
> cd ../maven-plugins
> mvn -Dmaven.test.skip install
> cd ../openvpms-archetypes
> mvn -Dmaven.test.skip install
> cd ../openvpms-reports
> mvn -Dmaven.test.skip install
> cd ../maven-plugins
> mvn -Dmaven.test.skip install
> cd ../openvpms-web
> mvn -Dmaven.test.skip install

 

Syndicate content