The Maven Repository used by OpenMRS is SonaType Nexus:
All artifacts needed for building the OpenMRS application and modules using Maven are managed in this repository, including:
The Ant releases must use this method. First follow the Prepare for Ant releases steps below to create the pom files.
Maven releases can use this or the Maven method below.
Deploy each artifact separately using the steps below.
These include the parent pom, api jar, tests jar, web jar, and webapp war.
For the parent pom, there are no artifacts to choose other than the pom.
If including source code for this artifact,
If including Javadocs for this artifact,
Repeat the upload process for each artifact.
Verify the artifacts were uploaded successfully:
If there is a problem with the upload,
Update your Maven settings.xml to include the OpenMRS Nexus server. You will need to add valid login credentials with roles to modify the repositories. If you do not have these then submit an IT Support ticket to request them.
Checkout the release tag from Subversion.
To build and deploy the project,
mvn clean deploy
Specific information about deploying a OpenMRS module to the maven repo can be found here.
For this deployment strategy to work, the key is that the server id in your settings corresponds to the id in your project's distributionManagement id in your project's main pom. So, for example in the settings above, openmrs-repo-modules corresponds to the distributionManagement id that i have in my module's main pom:
Ant built artifacts should have Maven pom.xml files created (with actual dependencies) to be useful for Maven omod module projects.
Start with the pom files from the previous version (1.6.2 for 1.6.3)
These can be downloaded from Nexus (parent, api, tests, web, and webapp poms)
If no libraries have changed (added, removed, or new version), simply update the version in the poms
Otherwise if libraries have changed, the dependencies will need to also be updated
When releasing 1.6.6 and 1.7.4 please make sure that the API pom has commons-io and commons-beanutils, which has not been included by mistake.
Run the Ant goals to build the jars and war, javadoc and sources (if possible)
For api, tests, and web jars:
For api Javadocs zip:
A new sources target would need to be created, matching the jar includes/excludes in the package targets for api, tests, and web.
This is not required but is helpful for debugging.
You can run these at the command line in order to upload artifacts:
To see how to generate the jars and the modified poms, see previous section.
Note that when deploying openmrs-test.pom, you need to point to api tests jar. It is not correct, but we need to do it for backwards compatibility with previously deployed versions.
If you cannot find a library you need to use in OpenMRS at http://mavenrepo.openmrs.org/ please create a ticket for the ITSM project in JIRA. Provide the public maven repository URL where the library can be found or only if the repository is not available attach a jar file. Specify groupId, artifactId, version and where you want to use it.