How to create and use RestClient with EHRBase SDK in my Maven project?
Specifically, how to specify the dependencies in the pom.xml? OR, should I build the SDK jar(s) locally or download them from a repo such as jitpack.io, then add them to my project’s Build Path?
For example, I want to get the following Java code working:
DefaultRestClient client = new DefaultRestClient(
new OpenEhrClientConfig(new URI("http://localhost:8080/ehrbase/")),
templateProvider);
You’re referring to the old version of the documentation. The current one is available at https://docs.ehrbase.org/, but I can’t find the page you’re looking for.
There is no need to use jitpack.io anymore. All artifacts are published on Maven Central, so you only have to add the client dependency into your pom.xml:
@subigre Based on your suggetsion, it’s found that the problem was possibly caused by the mirror in Maven settings.xml and the redundant parent tag ‘dependencyManagement’ for the dependencies.