Could not find artifact org.openmrs.module:serialization.xstream-omodđź«™0.2.14 in openmrs-repo

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?

1 Like

Is all well if you do not watch projects?

Yes. I just tested setting up a new distro without watching any projects. It runs without any issues.

Even if I manually install the file as shown in the error message, the error still persists. Not sure what to do here.

How about if you unwatch only this module but watch the others?

If I unwatch that module, It stops on a different module - org.openmrs.module:atlas-omod:jar:2.2 What might be the issue here?

[ **INFO** ] Configured Artifact: org.openmrs.module:atlas-omod:2.2:jar

Downloading from openmrs-repo: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/module/atlas-omod/2.2/atlas-omod-2.2.jar

Downloading from openmrs-repo-thirdparty: http://mavenrepo.openmrs.org/nexus/content/repositories/thirdparty/org/openmrs/module/atlas-omod/2.2/atlas-omod-2.2.jar

Downloading from openmrs-bintray-repo: https://dl.bintray.com/openmrs/maven/org/openmrs/module/atlas-omod/2.2/atlas-omod-2.2.jar

Downloading from central: https://repo.maven.apache.org/maven2/org/openmrs/module/atlas-omod/2.2/atlas-omod-2.2.jar

[ **INFO** ] **------------------------------------------------------------------------**

[ **INFO** ] **BUILD FAILURE**

[ **INFO** ] **------------------------------------------------------------------------**

[ **INFO** ] Total time: 09:31 min

[ **INFO** ] Finished at: 2020-09-09T23:09:31-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:atlas-omod:jar:2.2 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=atlas-omod -Dversion=2.2 -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=atlas-omod -Dversion=2.2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

[ **ERROR** ] 

[ **ERROR** ] 

[ **ERROR** ] org.openmrs.module:atlas-omod:jar:2.2

[ **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

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

After watching or unwatching?

Hi @nasif and @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.

Mike

Thanks @mseaton for pointing us in a direction that makes a lot of sense!

@nasif do you mind creating a JIRA ticket in the SDK project for someone to investigate this? You could even do it yourself if you have the time. :slight_smile:

I created a ticket.

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

Cannot tell without looking at the server side log.

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<

Are you using linux? If yes, try this: mvn openmrs-sdk:run | tee log.txt

1 Like