SDK - Capabilities

@raff @adamg @tmarzeion Excellent work as always on the SDK.

I was just wondering if the following features are available or planned for in the SDK:

  1. Running a custom sql script on installation of a module - instead of the default one for Reference application

  2. Adding server specific parameters to the file - port, debugging, forking etc so that they do not have to be specified on the command line. I am dealing with multiple servers with different configurations so would love to get rid of the text file containing the commands

  1. On installation of a module or on a server setup? If you mean the latter then you can specify -DdbSql=path/to/dump.sql I don’t quite understand why you would want to do the former?

  2. We have a way to specify debug port when setting up a server with -Ddebug=1045 (the wizard asks you about it, if you do not include it) or you can add debug.port=1045 to in your server directory. I see the information about that is missing in SDK docs. We have to address saving the tomcat port. You can create another issue for selecting the fork mode.

Thanks for suggestions!

@raff I would like to run the script on server setup, that way I can build my server with a demo database.

Would this work if I replaced db.sql=classpath\://openmrs-distro.sql with the path to my script? so that a developer never has to remember

Yes, it’s meant to work that way. Moreover when you do openmrs-sdk:build-distro, it will set it up so that the sql is loaded as well when creating a db container :slight_smile:

1 Like

@raff Would this be as easy as me adding a db.sql=classpath://ugandaemr-distro.sql file in the openmrs-distro.proerties

How do I package the SQL file? DO I just copy it to the classes directory of the omod?


You have an example of how to package the SQL in RA (basically put it in resources of your distro).

Thanks @raff Got you now