Setting up the OpenMRS SDK - having issues with omrs-run

Question: My apologies if this isn’t the right place for this type of question (I’m new here and the number of documents and communication tools is a bit overwhelming!). If so, please direct me to the appropriate venue to ask this question.

I am currently trying to set up a developer environment on my Mac (Mavericks) using http://en.flossmanuals.net/openmrs-developers-guide/get-set-up/. The setup seemed to go well, and when I run omrs-version I get:

OMRS Version:    1.0.5
OMRS Home:       /Applications/omrssdk-1.0.6
ORMS Scripts:    /Applications/omrssdk-1.0.6/bin
OMRS Maven Home: /Applications/omrssdk-1.0.6/apache-maven
--------
Apache Maven 3.1.0 ( 2013-06-27 19:15:32-0700)
Maven home: /Applications/omrssdk-1.0.6/apache-maven
Java version: 1.7.0_55, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.9.5", arch: "x86_64", family: "mac"

After installation, I cd’d to a new folder, ran omrs-create-module and answered all the questions. I received no errors. I cd’d into the root folder of the newly created module and executed ‘omrs-run’ but received the following error (I can produce the entire stack trace if requested):

[main] ERROR org.apache.maven.cli.MavenCli - Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.3:generate (default-cli) on project newexample: The desired archetype does not exist (org.openmrs.maven.archetypes:maven-archetype-openmrs-project:1.0.0-SNAPSHOT) -> [Help 1]

And obviously nothing is running at localhost:8080.

Where did I go wrong here? Also, as a side note, I don’t have MySQL installed but I don’t think that that was a requirement in the setup guide.

As another side note, I’ve tried googling this error message and have found quite a few people have reported it but nowhere have I seen a solution. That indicates to me that there may be some missing information in the setup process.

Appreciate any help!

1 Like

I did not solve the original problem, but I circumvented it by downloading the newer version of SDK on sourceforge (the link in the setup guide links to 1.0.6 but it should probably link to the newer 1.0.7 version!)

Hopefully this helps others who get stuck at this step. The error message (as well as any other error messages that are received while trying possible solutions and workarounds) makes it appear that there is a problem with the developers environment.

1 Like

I was facing the same problem. As Nicholas said, the update to the 1.0.7 version circumvents the problem. However, In my case, the environment variable “path” receives both versions, defined in the file .profile (home folder):

export PATH="$PATH:/home/alexzumalde/OpenMRS/omrssdk-1.0.6/bin"
export PATH="$PATH:/home/alexzumalde/OpenMRS/omrssdk-1.0.7/bin"

I removed the old, I restarted the machine and then the system ran. Thank you Nicholas.

@alexjavarotti, we now have SDK 2.0! See https://wiki.openmrs.org/display/docs/OpenMRS+SDK

1 Like

@alexjavarotti I’m glad that this was useful!

@raff, That’s good to know. It might be a good idea to update the new developer’s guide to reflect both that there is a new minor version on sourceforge (1.0.7) and that there is also a 2.0 major release for the SDK. The setup process is already complicated enough and little errors will slow newcomers down, or worse, deter them from completing the setup at all :worried:

1 Like

We would love updates & edits to the new developers guide! :trophy:

You can do so by signing in with a free FLOSS Manuals account and editing the book here: http://write.flossmanuals.net/openmrs-developers-guide/_edit/

I didn’t realize I could do that! I added a note for users to check for newer versions in the SDK directory. Perhaps @alexjavarotti might want to add a bit about fixing the PATH if necessary.

1 Like

I didn’t realize too. I added a note in the in the topic ‘Download and Install’. I wrote the note in a generic way, saying that in cases of update the SDK, and use of Linux, will be necessary review the .profile file. If you see something that can be improved, please feel free to do that.