Hey there,
I am using the openmrs-sdk-maven-plugin:4.0.1
to build a Dockerfile for an OpenMRS image with bundled modules.
openmrs-distro.properties
defines
omod.openmrs-atomfeed=${openmrs-atomfeedVersion}
and pom.xml
defines
<properties>
...
<openmrs-atomfeedVersion>2.5.6</openmrs-atomfeedVersion>
...
</properties>
<dependencyManagement>
<dependencies>
...
<dependency>
<groupId>org.ict4h.openmrs</groupId>
<artifactId>openmrs-atomfeed-omod</artifactId>
<version>${openmrs-atomfeedVersion}</version>
<type>jar</type>
</dependency>
...
</dependencies>
</dependencyManagement>
Running mvn clean install
fails with
[INFO] Configured Artifact: org.openmrs.module:openmrs-atomfeed-omod:2.5.6:jar
Downloading: https://mavenrepo.openmrs.org/public/org/openmrs/module/openmrs-atomfeed-omod/2.5.6/openmrs-atomfeed-omod-2.5.6.jar
Downloading: https://mavenrepo.openmrs.org/public/org/openmrs/module/openmrs-atomfeed-omod/2.5.6/openmrs-atomfeed-omod-2.5.6.jar
Downloading: https://mavenrepo.openmrs.org/thirdparty/org/openmrs/module/openmrs-atomfeed-omod/2.5.6/openmrs-atomfeed-omod-2.5.6.jar
Downloading: https://repo.maven.apache.org/maven2/org/openmrs/module/openmrs-atomfeed-omod/2.5.6/openmrs-atomfeed-omod-2.5.6.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.642 s
[INFO] Finished at: 2021-06-13T18:44:31+02:00
[INFO] Final Memory: 23M/94M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:4.0.1:build-distro (build-distro) on project platform: Unable to execute mojo: Unable to find artifact. Could not find artifact org.openmrs.module:openmrs-atomfeed-omod:jar:2.5.6 in openmrs-repo (https://mavenrepo.openmrs.org/public)
Please note that the group id has changed, the openmrs-sdk-maven-plugin
tries to download
org.openmrs.module:openmrs-atomfeed-omod:jar:2.5.6
while the actual dependency is
org.ict4h.openmrs:openmrs-atomfeed-omod:jar:2.5.6
The same behaviour happens for other dependencies where the group id is not org.openmrs.module
.
Is it possible that the openmrs-sdk-maven-plugin
overrides the group id?
Thank you, Wolf