Hi, I am running reference application distribution 2.10.0 using the SDK. I have watched all 44 projects locally because I need to do some experimentation of my own. However, all the projects are at the release branch specified by referenceapplication distro:2-10-0 and no change has been made after that in the code. However, when I run openmrs-sdk run all projects builds successfully but fails at configuring org.openmrs.module:serialization.xstream-omod:jar:0.2.14 with this error message:
[ **INFO** ] artifact org.openmrs.module:serialization.xstream-omod: checking for updates from openmrs-repo
[ **INFO** ] artifact org.openmrs.module:serialization.xstream-omod: checking for updates from openmrs-repo-thirdparty
[ **INFO** ] artifact org.openmrs.module:serialization.xstream-omod: checking for updates from openmrs-bintray-repo
[ **INFO** ] artifact org.openmrs.module:serialization.xstream-omod: checking for updates from central
[ **INFO** ] Configured Artifact: org.openmrs.module:serialization.xstream-omod:0.2.14:jar
Downloading from openmrs-repo: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/module/serialization.xstream-omod/0.2.14/serialization.xstream-omod-0.2.14.jar
Downloading from openmrs-repo-thirdparty: http://mavenrepo.openmrs.org/nexus/content/repositories/thirdparty/org/openmrs/module/serialization.xstream-omod/0.2.14/serialization.xstream-omod-0.2.14.jar
Downloading from openmrs-bintray-repo: https://dl.bintray.com/openmrs/maven/org/openmrs/module/serialization.xstream-omod/0.2.14/serialization.xstream-omod-0.2.14.jar
Downloading from central: https://repo.maven.apache.org/maven2/org/openmrs/module/serialization.xstream-omod/0.2.14/serialization.xstream-omod-0.2.14.jar
[ **INFO** ] **------------------------------------------------------------------------**
[ **INFO** ] **BUILD FAILURE**
[ **INFO** ] **------------------------------------------------------------------------**
[ **INFO** ] Total time: 50:02 min
[ **INFO** ] Finished at: 2020-09-08T23:40:37-04:00
[ **INFO** ] **------------------------------------------------------------------------**
[ **ERROR** ] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.13.6:run **(default-cli)** on project standalone-pom: **Unable to execute mojo** : Unable to find artifact. Could not find artifact org.openmrs.module:serialization.xstream-omod:jar:0.2.14 in openmrs-repo (http://mavenrepo.openmrs.org/nexus/content/repositories/public)
[ **ERROR** ]
[ **ERROR** ] Try downloading the file manually from the project website.
[ **ERROR** ]
[ **ERROR** ] Then, install it using the command:
[ **ERROR** ] mvn install:install-file -DgroupId=org.openmrs.module -DartifactId=serialization.xstream-omod -Dversion=0.2.14 -Dpackaging=jar -Dfile=/path/to/file
[ **ERROR** ]
[ **ERROR** ] Alternatively, if you host your own repository you can deploy the file there:
[ **ERROR** ] mvn deploy:deploy-file -DgroupId=org.openmrs.module -DartifactId=serialization.xstream-omod -Dversion=0.2.14 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ **ERROR** ]
[ **ERROR** ]
[ **ERROR** ] org.openmrs.module:serialization.xstream-omod:jar:0.2.14
[ **ERROR** ]
[ **ERROR** ] from the specified remote repositories:
[ **ERROR** ] openmrs-repo (http://mavenrepo.openmrs.org/nexus/content/repositories/public, releases=true, snapshots=true),
[ **ERROR** ] openmrs-repo-thirdparty (http://mavenrepo.openmrs.org/nexus/content/repositories/thirdparty, releases=true, snapshots=true),
[ **ERROR** ] openmrs-bintray-repo (https://dl.bintray.com/openmrs/maven/, releases=true, snapshots=true),
[ **ERROR** ] central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
[ **ERROR** ] -> **[Help 1]**
[ **ERROR** ]
[ **ERROR** ] To see the full stack trace of the errors, re-run Maven with the **-e** switch.
[ **ERROR** ] Re-run Maven using the **-X** switch to enable full debug logging.
[ **ERROR** ]
[ **ERROR** ] For more information about the errors and possible solutions, please read the following articles:
[ **ERROR** ] **[Help 1]** http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I have checked the download links are actually unavailable. My question is: 1) If I have watched the org.openmrs.module:serialization.xstream-omod:jar:0.2.14 locally, why is not SDK pulling this module from local and instead trying to download from remote urls; 2) Is manually downloading the file and installing it the only option as specified in the error message?
After unwatching these two modules: org.openmrs.module:atlas-omod:jar:2.2 , org.openmrs.module:serialization.xstream-omod:jar:0.2.14 - the application runs successfully. Is there any way I can debug what’s the issue with this two module? @dkayiwa
Just to point you in one possible direction, the serialization.xstream module is published to Maven with a non-standard type (eg. it is in our Maven repository as an artifact with an “omod” extension, and has a “type” of “omod”.
By contrast, the vast majority of modules (and the standard way of doing it) is to publish the module to Maven with a “jar” extension, and a type = “jar”, and then to rename this to an omod upon building a distribution.
In order to handle the serialization.xstreams different behavior (and the same is found in a handful of other modules), the SDK looks for a extra property in openmrs-distro.properties to tell it how and where to find this artifact. This is in the format “omod.moduleid.type=omod” as seen here.
It is certainly possible that the SDK “watch” functionality is not handling this particular use case properly. That’s where I would investigate if I were to start looking into this.
Asking this question just for my own understanding: If I am watching these projects, and they get built locally on my machine why do the SDK has to fetch these files from the remote?
To add, openmrs actually do not run smoothly when I watch the modules locally. As you can see in the attached image that there are 23 alerts saying there is an error starting a module. What I have done so far is only clone the listed modules in distro reference application locally and checked out to the release specified for the distro. So why can’t I run properly while if I just set up the server without any watching any module, everything runs smoothly? Any suggestion? @dkayiwa
Can you help me how to store the server side logs? I have enabled debugging at 1044 port but localhost://1044 does not work with this error message on my terminal:
Debugger failed to attach: handshake failed - received >GET / HTTP/1.1< - expected >JDWP-Handshake<