Updating Mavenized modules to compile against OpenMRS 1.8.0 and higher
This page is outdated and no longer receives updates!
In the pom.xml of the parent project of a module, you set the version of OpenMRS to compile and test the module against.
<openMRSVersion>1.6.3</openMRSVersion>
Once you attempt to compile and test against OpenMRS 1.8.0 or higher, you'll need to update the OpenMRS dependencies in the three module poms as follows to reflect the new Maven structure introduced in OpenMRS 1.8.0.
main pom.xml:
<dependency>
<groupId>org.openmrs.api</groupId>
<artifactId>openmrs-api</artifactId>
<version>${openMRSVersion}</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.openmrs.api</groupId>
<artifactId>openmrs-api</artifactId>
<version>${openMRSVersion}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openmrs.web</groupId>
<artifactId>openmrs-web</artifactId>
<version>${openMRSVersion}</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.openmrs.web</groupId>
<artifactId>openmrs-web</artifactId>
<version>${openMRSVersion}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openmrs.test</groupId>
<artifactId>openmrs-test</artifactId>
<version>${openMRSVersion}</version>
<type>pom</type>
<scope>test</scope>
</dependency>
omod pom.xml:
<dependency>
<groupId>org.openmrs.api</groupId>
<artifactId>openmrs-api</artifactId>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.openmrs.api</groupId>
<artifactId>openmrs-api</artifactId>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.openmrs.web</groupId>
<artifactId>openmrs-web</artifactId>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.openmrs.web</groupId>
<artifactId>openmrs-web</artifactId>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.openmrs.test</groupId>
<artifactId>openmrs-test</artifactId>
<type>pom</type>
</dependency>
api pom.xml:
<dependency>
<groupId>org.openmrs.api</groupId>
<artifactId>openmrs-api</artifactId>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.openmrs.api</groupId>
<artifactId>openmrs-api</artifactId>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.openmrs.web</groupId>
<artifactId>openmrs-web</artifactId>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.openmrs.web</groupId>
<artifactId>openmrs-web</artifactId>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.openmrs.test</groupId>
<artifactId>openmrs-test</artifactId>
<type>pom</type>
</dependency>
If you don't make these changes, you will see an error on mvn package like: org.openmrs.test:openmrs-test:jar:1.8.0 artifact is missing .
, multiple selections available,
Related content
Upgrading OpenMRS
Upgrading OpenMRS
More like this
Upgrade OpenMRS Standalone 2.0 to OpenMRS 2.1
Upgrade OpenMRS Standalone 2.0 to OpenMRS 2.1
More like this
Upgrade OpenMRS Standalone 2.1 to OpenMRS 2.2
Upgrade OpenMRS Standalone 2.1 to OpenMRS 2.2
More like this
Installing OpenMRS 2.x
Installing OpenMRS 2.x
More like this
Step 4 - Deploy new openmrs.war file
Step 4 - Deploy new openmrs.war file
More like this
OpenMRS Implementor Series 101 – Building a distribution package
OpenMRS Implementor Series 101 – Building a distribution package
More like this