If my understanding is correct, the file responsible for this is:
I’m ready to help and create a PR for this, however my skills in java are very low and I’m having problems with building the package. Here are the steps that I did:
Fork the project on github
Clone it locally
Run: mvn clean package
Then I get the following errors:
[ERROR] Failed to execute goal on project openhmis.inventory-api: Could not resolve dependencies for project org.openmrs.module:openhmis.inventory-api:jar:3.0.0: The following artifacts coul
d not be resolved: org.openmrs.module:openhmis.commons-api:jar:4.0.0, org.openmrs.module:openhmis.commons-tests:jar:4.0.0, org.openmrs.module:jasperreport-api:jar:2.0.0: Failure to find org.
openmrs.module:openhmis.commons-api:jar:4.0.0 in http://mavenrepo.openmrs.org/nexus/content/repositories/public was cached in the local repository, resolution will not be reattempted until the update interval of openmrs-repo has elapsed or updates are forced -> [Help 1]
The module has quite a number of dependencies on snapshot versions of other modules. So it requires you to first compile each of those modules with mvn clean install, before you can successfully compile this one. For instance, that error requires you to first compile this one: https://github.com/OpenHMIS/openmrs-module-openhmis.commons
Thanks again @dkayiwa for your help, it is very much appreciated!
I could get passed my previous error, by compiling openmrs-module-openhmis.commons and openmrs-module-jasperreports. But one of the test from openmrs-module-openhmis.inventory fails and I get the following error:
Error message
Results :
Failed tests:
StockOperationServiceImplTest.calculateReservations_shouldCreateAdditionalTransactionsWhenWhenMultipleDetailsAreNeedToFulfillRequest:749 null
Tests run: 639, Failures: 1, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] OpenHMIS Inventory Module 3.1.0-SNAPSHOT ........... SUCCESS [ 0.130 s]
[INFO] OpenHMIS Inventory Module Module API ............... FAILURE [01:34 min]
[INFO] OpenHMIS Inventory Module Module OMOD 1.x .......... SKIPPED
[INFO] OpenHMIS Inventory Module Module OMOD 2.x .......... SKIPPED
[INFO] OpenHMIS Inventory Module Module OMOD 3.1.0-SNAPSHOT SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:34 min
[INFO] Finished at: 2020-02-28T10:26:56Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14:test (default-test) on project openhmis.inventory-api: There are test failures.
[ERROR]
[ERROR] Please refer to /home/nicolas/projects/ELWA/IT/openmrs/modules/openmrs-module-openhmis.inventory/api/target/surefire-reports for the individual test results.
[/details]
Hello!
Is there a chance you can share these inventory omod files with me here? I have tried compiling but without success. And to make things worse I am not a coder. Will be really appreciated as using spanish im my health facility to run reports is a bit confusing and frustrating,
Thanks in advance
I did, Daniel. I am using the latest OMOD file from there. It was last updated 3 years ago.
It still has the spanish language error.
I have followed your advice in this post. I was able to successfully compile openhmis common and jasper reports. However, unable to compile inventory due to error as in above post. You had advised the poster to ignore the error and just continue.
My question is: Where is the OMOD file stored if the build was a failure?
Many thanks in anticipation of your help.
Hi,
I am also trying to build openhmis-inventory module from source. I have followed all the above and have gotten stuck at the following error
[ERROR] Failed to execute goal on project openhmis.inventory-api: Could not resolve dependencies for project org.openmrs.module:openhmis.inventory-api:jar:3.1.0-SNAPSHOT: Failed to collect dependencies at org.openmrs.module:jasperreport-api:jar:2.1.0-SNAPSHOT: Failed to read artifact descriptor for org.openmrs.module:jasperreport-api:jar:2.1.0-SNAPSHOT: Could not transfer artifact org.openmrs.module:jasperreport-api:pom:2.1.0-SNAPSHOT from/to openmrs-repo-thirdparty (JFrog): Transfer failed for JFrog 409 Conflict → [Help 1]
One issue I found with some of the openhmis projects was that “DefaultAnnotationHandlerMapping”, was giving an issue with the new spring5 , since spring5 is not supporting DefaultAnnotationHandlerMapping.
I got this resolved by commenting the bean mapping in webModuleApplicationContext.xml.
Since we do not need to specify annotation handlers with spring5, shouldn’t we permanently fix this by removing the bean mapping from webModuleApplicationContext.xml ?