OpenMRS SDK 3.0 released!

Hey,

I’m pleased to announce the release of OpenMRS SDK 3.0! The release was mostly possible thanks to the help from Soldevelo and in particular @adamg, @gutkowski, @tmarzeion. Thank you guys!

If you used the SDK before, it should have been automatically updated for you by now. You can verify the version by typing mvn openmrs-sdk:help. If it’s not, then refer to our wiki page on how to upgrade manually. See this post for possible incompatibilities (will be fixed soon).

If you haven’t used it yet, it’s the best time to try it out! See installation instructions on our wiki.

We have improved wizards to make it even easier for you to pick up our new tool. We’ve added support for developing distributions and improved support for openmrs-core development. There’s support for deploying Open Web Apps. We’ve also included an alpha support for springloaded, which allows for live-reloading of API classes in modules.

I’ve covered some of those features on the last developers forum. Please follow this link to watch the recording.

Regardless if you are a new developer or OpenMRS veteran, we are sure it will increase your productivity so give it a chance!

Also we are almost done with the next 3.1 release. It will bring even more exciting features including:

  • faster setup of new servers using mysql thanks to pre-created database
  • updating and building a number of modules with one command
  • forking and cloning a project given its id
  • creating and updating pull requests from command line
  • improved scaffoldings for new modules
  • and more!

Please look out for the 3.1 release within a week!

14 Likes

Thanks for doing this Rafal & team! This should be a big help in getting new developers up to speed.

Take care, Mark

Great work guys!

This is awesome, thanks all!

So, here’s the question… are all the /dev/5’s using the SDK?

If not, why not? :slight_smile:

What will amplify the vitality of the SDK is getting everyone using the SDK on a daily basis. :slight_smile:

When I did lots of active development on a few specific projects, I did not use the SDK, or need to. Now that I only occasionally touch code, the SDK is very helpful.

So, to answer the “why not” question, the SDK doesn’t add value if you’ve already got a project environment set up (and likely some custom shell scripts you’re familiar with).

It does add value if you work with different combinations of OpenMRS and module versions, and/or frequently switch between them.

So to any experienced OpenMRS developers not currently using the SDK, I highly suggest you use it the next time you set up an environment. It has really gotten nice, and it can likely replace any custom shell scripts you’ve already written.

(Personally what I think would make it even more awesome is if it could leverage docker so that (a) you don’t even need to install mysql, and (b) you can easily test different DBs and versions.)

2 Likes

@raff Trying out the SDK but I am unable to setup the distribution for 2.4-SNAPSHOT as it no-longer exists

Do a 2.4 or 2.5-SNAPSHOT

SDK 3.0 has hardcoded Reference Application versions, so 2.4-SNAPSHOT is still one of options, despite it is not available in OpenMRS Maven repository. Upcoming 3.1 version (release in the coming days) will resolve them dynamically using metadata from repositories. For now, as @dkayiwa said, you can setup eg. 2.4 by choosing option 5) Other... and entering referenceapplication:2.4

@gutowski thanks

Hi @raff and Team. I started exploring the sdk today. I’ve not done much yet with as am having an error. But so far I have enjoyed the few new features I’ve seen. Keep up the good work. Now to my problem. I get this error when i run mvn openmrs-sdk:run -DserverId=server-1

The server was setup for 2.1.0-SNAPSHOT running on mysql database and currently has the legacyui module deployed through mvn openmrs-sdk:deploy but i am unable to start the server due to error shown above.

Thanks @ivange94 for reporting the issue. It seems there’s something tricky with your Maven config. Could you please run the following commands for us and paste the output?

mvn -version
echo %M2_HOME%
echo %JAVA_HOME%

Also as a temporary fix you can run the server by disabling forking: mvn openmrs-sdk:run -Dfork=false

UPDATE: the issue is fixed in https://issues.openmrs.org/browse/SDK-131 (will be released with SDK 3.1)

I’m setting up a new laptop today and took the opportunity to see if I could switch to setting up my development environment using the SDK. I was able to set up a openmrs-distro.properties file for the PIH-EMR, and get everything to work–one command to set up an instance of the PIH EMR! So great work guys!

One minor question–in the runtime properties file of our PIH EMR instances we set a variable “pih.config” that tells each specific instance what configuration to use. Is there any place in the process to specify certain runtime properties values? My current workaround is, after setup, to do an openmrs-sdk:run. Then, after OpenMRS creates the openmrs-runtime.properties file I kill the run, add the line to the properties file and then restart. Certainly not a blocker by any means–and might be difficult to implement because I believe we still rely on OpenMRS itself (not the SDK) to generate the runtime properties file?

But again, great work! Thanks to @raff @adamg @gutkowski and @tmarzeion for working on this!

Will be working on setting up debuggging, etc, tomorrow–may have further questions then.

Take care, Mark

1 Like

@mogoodrich, thanks for sharing your experience!

We could definitely enable you to set a variable when setting up a server. Could you please create an issue describing the feature you need? In particular should the wizard ask you for the value of the variable? Must the variable be included in runtime properties or can it be a system property?

Great, let me think through my use case and I will add a ticket.

I’d definitely like the ability to maintain the same functionality, so unless a system property can seamlessly overrride or set a runtime property, would definitely like the ability to set a runtime property.

Thanks!

Mark

@raff I added a ticket for this, and another for a (minor) bug I found.

I just want to say again, though, that using the SDK has been great experience so far–thanks for pushing this forward!

Mark

1 Like

OpenMRS SDK 3.1.1 released!

Most reported issues should have been fixed! Thanks!