Issue installing OpenMRS sdk

(Imoh Noah) #1

I am following the developer guide to install OpenMRS sdk. I successfully ran the setup-sdk command with no errors -
mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk

However, when I run the command - mvn openmrs-sdk:help I receive an error -

I looked at older threads with this similar error and tried the steps they used to resolve it, like mvn clean install or setup-sdk but no luck.

Please help.

(Suthagar Kailayapathy) #2

Can you confirm that, the OpenMRS SDK installed successfully? Better reinstall and restart system :slight_smile:

(Irene Nyakate) #3

sorry about that @inoah, please post the full log

(Imoh Noah) #4

I am not able to confirm that openmrs sdk was installed successfully. I tried reinstall and restart, no luck.

(Imoh Noah) #5

I am running this on cmd. Here is the full log -

(Irene Nyakate) #6

@inoah the fact that it causes and error when you run mvn openmrs-sdk:help , then it may not have installed properly. can try deleting all the old sdk files and restart your machine and install again with this command mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk

(Imoh Noah) #7

I tried deleting all sdk files from my maven repo and restarted. But still getting same error. Am I not deleting all sdk files correctly?

(Samuel Male) #8

According to your error log, it tells that you don’t have the sdk plugin in your local maven repo yet it’s expected to be cached. But this time round before running the setup of the sdk, make sure you delete this directory. .m2\repository\org\openmrs and then rerun mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk and tell us what happens.

(Imoh Noah) #9

Yes, I tried deleting all plugin files - Restarted my machine and ran the setup command. Still, receive the same error -

I appreciate everyone trying to help me resolve this. Thank you.

(Daniel Kayiwa) #10

What does this command return? mvn -v

(Imoh Noah) #11
D:\>mvn -v
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T14:41:47-04:00)
Maven home: D:\Java\apache-maven-3.6.0\bin\..
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_181\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

(Daniel Kayiwa) #12

Can you try delete the entire .m2 folder and then compile again?

(Imoh Noah) #13

Tried that as well but still receive the same issue.

Could it be that the jar file for openmrs-sdk is missing from the repo

Screenshot of missing jar in local repo -

(Daniel Kayiwa) #14

What is your current error log?

(Imoh Noah) #15

Still getting the same error - No plugin found for prefix ‘openmrs-sdk’

(Daniel Kayiwa) #16

Can you share the current log?

(Imoh Noah) #17

Here is the full log output.txt (751.8 KB)

Could not copy the log to pastebin (too large). hopefully I’m allowed to upload as txt file.

(Daniel Kayiwa) #18

Can you upgrade your maven to at least version 3.3.9?

(Imoh Noah) #19

I currently have maven version 3.6.0. Do I need to downgrade to version 3.3.9 to get this plugin?

(Daniel Kayiwa) #20

Yes. Try downgrading to that version.