See the code for this example in action in the idgenws module: http://svn.openmrs.org/openmrs-modules/idgenws/trunk
Modify pom.xml files
If your API layer requires a reference to the module, add a reference to the api/pom.xml file:
If your web layer requires a reference to the module, add a reference in the omod/pom.xml file:
It is important to make sure you set the parameter
so that the jar of the referenced module is not included is the this module's omod.
Install the omod into your local repository
If the module are trying to include exists in the parent, you can skip this step
When running "mvn package" you will probably see an error like:
This happens because maven is unable to find the "idgen" jar in any public repository. We can get around this by either publishing to the openmrs maven repository (mavenrepo.openmrs.org) or by putting it in a local repo.
Installing omod to a local repo
The maven error output gives you a hint to out to install to a local repo. This script will download the omod/jar and install it for you using that line:
If the module you want to include is mavenized, get BOTH the api and omod jars from the target folders and "mvn install" them.
Installing omod to openmrs maven repo
Open a new ITSM ticket in jira to request that your module be added.
Modify config.xml file
Add an element like this: