[ Resolved ] fhir2-api: Compilation failure | Could not find artifact org.openmrs.module:initializer-api:jar:2.5.0-SNAPSHOT

Hey Folks,

Am currently working on botswanaemr … have switched to a new machine using Java 8 en Apache Maven 3.6.3 already configured …however am encountering this error in building our module so I thought it was abt the fhir module…though it also returned the same

have deleted the .m2 folder and recomplied but still the same error though

cc @ibacher @abertnamanya @dkayiwa


Also we are using openmrs-module-initializer 2.5.0-SNAPSHOT however there was an update to Version 2.6.0 which also is causing

since Version 2.5.0 cannot be fetched upstream

cc @ruhanga @mksd

@jonathan to resolve the Initializer dependency download issue, you’ll have to add the mks-nexus repositories to your module root pom like is done on the Ref App distro;

1 Like

About the error coming from the fhir2 api, there could be some transitive dependencies that are part of some fhir2 api sub-modules. Those you’ll have to explicitly depend on inside your module’s pom, that is if you are leveraging those fhir2 api submodules coming with transitive dependencies. For example you might want to add the submodule that has the required packages as dependency to the module you are working on (simpler to do and ideal) such as

<dependency>
		<groupId>org.openmrs.module</groupId>
		<artifactId>fhir2-api<</artifactId>
		<version>1.10.0-SNAPSHOT</version>
</dependency>

or add the particular transitive dependencies independently such as

<dependency>
    <groupId>ca.uhn.hapi.fhir</groupId>
    <artifactId>hapi-fhir-structures-r4</artifactId>
    <version>5.4.0</version>
</dependency>

thanks @ruhanga this really saved my day …also have deleted the /home/muta-jonathan/.m2/repository/ca/uhn/hapi/fhir/org.hl7.fhir.r4/5.4.0 and rebuilded the module this also has cleared the fhir2 error :wink: :blush: