Installing SDK on windows

Hello OpenMRS community i am trying to install SDK but some where i am failing. according to the Open MRS manual i managed to go through the previous steps but when i reached cd basicexample mvn clean install openmrs-sdk:run at this step it showed build failure and errors.

1 Like

Hi Jane do you mind sharing a screen shot of the error you are getting.

@janie sorry for that, do you mind showing the steps you have done so far??

@bwambale here are the steps Setup

To setup the OpenMRS SDK you just need to open up a terminal/console and enter:

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

Once it is finished, you can make sure the OpenMRS SDK works by running the following command:

mvn openmrs-sdk:help

It should produce the following output:

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------< org.apache.maven:standalone-pom >-------------------

[INFO] Building Maven Stub Project (No POM) 1

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

[INFO]

[INFO] --- openmrs-sdk-maven-plugin: 3.13 . 4 :help ( default -cli) @ standalone-pom -

--

OpenMRS SDK 3.13 . 4

For more info, see SDK documentation: https: //wiki.openmrs.org/display/docs/OpenMRS+SDK

If that is the case, you have successfully installed the SDK.

Upgrade

You can upgrade to the latest version of the OpenMRS SDK by running:

mvn openmrs-sdk:setup-sdk -U

Basic usage

Let’s start from creating a server to run the OpenMRS platform or a distribution.

mvn openmrs-sdk:setup

When asked specify server id, which you will later use to run your server. You can have as many servers as you want. Each server can run a different set of modules and use a different database.

Next type ‘1’ to setup a distribution or ‘2’ to setup the OpenMRS platform without any modules.

Note that for running a distribution you will most likely need to have MySQL 5.7 installed.

Answer all remaining wizard questions, which may include selecting a version of platform or distribution, database connection details, JDK path.

Next let’s create a module.

mvn openmrs-sdk:create-project up to here i had been succesfull. let me share the screen shot too…

@janie did you manage to create the server ??

@wolterbwambale yap…i remember succeeding on that step.

The SDK appears to have been installed. Use this link to find steps to building your first module.(Ensure that you note the directory) https://wiki.openmrs.org/display/docs/Create+and+Deploy+Your+First+OpenMRS+Module

Then ensure that you have MySQL setup and the service running(MySQL work bench is of great help). Set the root password as well.

Make sure you are in the directory that you built your module in and run the commands you were running as before Set Up OpenMRS Server with OpenMRS SDK and Docker - Documentation - OpenMRS Wiki

Personally, I used the 1st option MySQL 5.6(requires MySQL preinstalled) and went through the wizard and it was able to work. Kindly try this @janie and share feedback

@janie oh sorry for the error. Was the server build successfully? kindly what do you get when you run this command mvn openmrs-sdk:run?

This is the error you are getting while running the program from the command prompt The system cannot find the path specified . The root cause of this error is invalid directories, sub-directories in the PATH environment variable, just remove them and the error will be solved. Kindly let me know if you still need help.

@kazlaw thanks let me try out that