difficulty installing OpenMRS SDK

I installed OpenMRS SDK and maven and I ran the command : “mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk” as mentioned in OpenMRS SDK - Documentation - OpenMRS Wiki

though, when I run the command: omrs-version I get this error:

I’m using JDK 1.7.0_79 apache-maven-3.3.9 omrssdk-1.0.7 and windows 10

Please use a regular windows command line (cmd). MINGW32 has not been tested.

1 Like

what should the variable value be? this is the directory of my maven installation

Did anyone have a similar problem?

hi @hossam

You are using an old version of the sdk (1.0.7 but sdk is already in 2.x realm). I can only imaging that you are reading the developers guide and thats where you found the old sdk. But that guide has not been updated for a while now. Here is a link to the latest version of the sdk, https://wiki.openmrs.org/display/docs/OpenMRS+SDK. Try the instructions stated there to work with new the latest version of the sdk. Also in future it would be nice if you check the instructions on the guide with that on the wiki since the wiki is more frequently updated than the guide.

2 Likes

About your m2_home referring to a wrong directory, mvn -v working does not mean that (M2_HOME) has been properly set, it simply means that, “mvn” is in your path variable, which is usually done by adding the bin directory of maven to the path. To be sure that your M2_HOME is properly set and its just the sdk that is giving errors, trying this

echo %M2_HOME% (in a linux shell that would be, echo $M2_HOME)

You should see something like, “C:\Program Files\apache-maven-3.3.9”. If you don’t then you have not properly set M2_HOME

1 Like

Yes I saw the wiki page you’re referring to but I’m not sure where I can download version 2.1 from. is there a download link?

1 Like

did you see this line?

  1. Setting up OpenMRS SDKFor setup the SDK you just need to open the terminal and execute:

mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk

The above command is all you need. You don’t need to do any download manually.

2 Likes

Thank you :slight_smile: