I get the following error when running mvn openmrs-sdk:setup
[ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:2.0.2:setup (default-cli) on project openmrs-sdk-tool: Execution default-cli of goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:2.0.2:setup failed: mavenProject may not be null → [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:2.0.2:setup (default-cli) on project openmrs-sdk-tool: Execution default-cli of goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:2.0.2:setup failed: mavenProject may not be null
Can you explain the situation in more detail? What parameters for “setup” you used? From which folder you executed this command?
Also, info about your OS and Maven version may be helpful for us. Currently all tasks from SDK works normally (checked on Kubuntu 15.04 with Maven 3.2.1)
It looks like you properties file has invalid attribute - ‘serverId’, it must be called ‘server.id’. Maybe this file was created by previous (unstable) version of SDK?
Please try to change ‘serverId’ to ‘server.id’, and then execute ‘setup’
@dmytro_trifonov updated the properties but still the same error, even after double checking the connection credentials. The tables are also not created in the database
Strange the plain SDK seems to work, I have gone ahead and removed all the parameters from the properties file, which seemed to work with no errors. However the error seems to be tied to the modules configuration, so when I have even one module I get an error.
Thanks for your reply, I found a bug in SDK, and just fixed it in sources.
In nearest time we will release a fix version. I will notify you about that.
@dmytro_trifonov I added them to the properties file, and what I have seen is that they are not downloaded in the modules directory of the at /Users/ssmusoke/openmrs//modules as I would expect. Not sure if the configuration is right, I assume that it is.
It seems like some of you modules (for example, dataintegrity) doesn’t published on central or OpenMRS repository (which is http://mavenrepo.openmrs.org/). But maybe they are installed in you local repo?. Please check it before trying to setup a server.
@dmytro_trifonov just noticed another bug with the SDK, it only downloads the first module in the user_modules list.
Another question, there is a default modules list for the platform that is downloaded as part of setup, however in my case I am using some older versions of the modules, does the list in the SDK constants ever get updated or merged with what is in the properties file?
The current error I am getting from the snapshot is Caused by: java.lang.NullPointerException
at org.openmrs.maven.plugins.utility.PropertyManager.replaceDbNameInDbUri(PropertyManager.java:160), however I have corrected all the constants to match the names on the page.
Thanks for all your assistance and support with this
You mean, that setup finished successfully, but only one module was loaded?
The feature of installing user modules was designed for testing modules, which is user develops. We don’t expect that this modules will be the part of OpenMRS distro. So, when you will try to install modules, which higher versions already installed, it may cause problems. It will be better to download them manually, and put them to $HOME/openrms/*SERVER_ID*/modules folder
Can you put there command, attributes and full log for this error? Thanks!
@dmytro_trifonov I suspect that I was using the SDK in a way that it was not meant to be used, so I have changed tactics and am now using a distro approach just like the reference application to build the required modules for distribution. Thanks for your assistance, and patience with the back and forth.