Unable to build openmrs module with maven due to unresolved maven dependency

This is what i got: Scanning for projects… The build could not read 1 project -> [Help 1]

The project org.openmrs.module:mymodule:1.0.0-SNAPSHOT (/Users/gilbertagbodamakou/mymodule/pom.xml) has 1 error Non-resolvable import POM: Failure to find org.openmrs.distro:referenceapplication:pom:1.9.11 in http://mavenrepo.openmrs.org/nexus/content/repositories/public was cached in the local repository, resolution will not be reattempted until the update interval of openmrs-repo has elapsed or updates are forced @ line 34, column 25 -> [Help 2]

To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging.

@greenshellit have u tried to build with <mvn clean install -U >

@greenshellit could you put the whole error log on paste bin!

I tried “mvn clean install openmrs-sdk:run” and also “mvn clean install -U” But same result

This is the pastebin https://pastebin.com/vpHwhJRG

@greenshellit what exactly do you want to do ?? can you list down the steps of what you have so far done ?

@mozzy, i want to create an openMRS module for the openMRS 1.9.11 version. This module will help me post data to openHIM and will use the openMRS event module (https://wiki.openmrs.org/display/docs/Event+Module). to do that i:

  • Downloaded the openMRS SDK
  • Downloaded and installed the JDK 1.7
  • Created a server as explained here https://wiki.openmrs.org/display/docs/OpenMRS+SDK
  • Created a simple module for testing
  • Tried to build that module without any modification At this step, i’m getting the error above.

From your need , you only need a platform module.

but looking at your error logs below

1. Downloading from openmrs-bintray-repo: https://dl.bintray.com/openmrs/maven/org/openmrs/distro/referenceapplication/1.9.11/referenceapplication-1.9.11.pom

2. Downloading from central: http://repo1.maven.org/maven2/org/openmrs/distro/referenceapplication/1.9.11/referenceapplication-1.9.11.pom

3. [ERROR] [ERROR] Some problems were encountered while processing the POMs:

4. [ERROR] Non-resolvable import POM: Could not find artifact org.openmrs.distro:referenceapplication:pom:1.9.11 in openmrs-repo

you seem to have created a reff-app module .

Taking you back a little ,when choosing options for module creation on the sdk commandline, did you choose a platform module or a reference app module ??

Yes @mozzy, you are right, i created a “Reference Application module”, So i need to create a “Platform module”.

1 Like

I think we can close this thread. thank you for your help.

have you finally solved the blocker? like tried out a platform module and it compiled ?

Yes I did that, i got an error on Test: this is the pastbin: https://pastebin.com/uAF2DqEt i’m still checking . Thank you

ok which version of the platform did you create ??

However , we also have a few minor bugs in the sdk , some time some failures like the above may be due to the a few small bugs in the sdk.

In the above case , you would first run
mvn clean install -Dmaven.test.skip=true -U to skip the tests , then fix the test manually.

1 Like

And the truth is , in most versions, it would be hard to create the module first time , and it runs succesfully in a running instance without fixing some thing manually. as long as it can be able to compile , then anything else can be fixed

I created for the 1.9.11 version.

mvn clean install -Dmaven.test.skip=true -U worked fine. I got this: [ INFO ] Reactor Summary for MyModuleName 1.0.0-SNAPSHOT:

[ INFO ]

[ INFO ] MyModuleName … SUCCESS [ 4.971 s]

[ INFO ] MyModuleName API … SUCCESS [ 22.175 s]

[ INFO ] MyModuleName OMOD … SUCCESS [ 6.410 s]

[ INFO ] ------------------------------------------------------------------------

[ INFO ] BUILD SUCCESS

[ INFO ] ------------------------------------------------------------------------

[ INFO ] Total time: 33.929 s

[ INFO ] Finished at: 2019-08-26T13:36:45+01:00

[ INFO ] ------------------------------------------------------------------------

I can now start. Thank you

2 Likes

now you can fix that test if you want :smile:

1 Like