I have have cloned openmrs-core from github and install using mvn install. At first i was having test failure and the build fails. Even when i skipped the tests using -Dmaven.test.skip=true i still had errors. It was suggested to me that i should skip test using -DskipTests=true instead and the build was successful. But now i am try to install the sdk using the command mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk -Dmaven.remote.repo=JFrog as instructed on the openmrs sdk documentation page. But i get the following error:
[ERROR] Error resolving version for plugin ‘org.openmrs.maven.plugins:openmrs-sdk-maven-plugin’ from the repositories [local (/home/m0dz3r0/.m2/repository), central (Central Repository:)]: Plugin not found in any plugin repository → [Help 1]
It should be noted that i am completely new to maven. I have not found any thing helpful using google search. Thanks in advance.
i have skipped the sdk installation and proceeded to creating my introductory module using maven archetype mvn module-wizard:generate. The module is been generated successfully but when i run mvn clean install inside the module parent directory i get the following errors.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project helloworld-api: Compilation failure: Compilation failure:
[ERROR] error reading /home/m0dz3r0/.m2/repository/org/openmrs/api/openmrs-api/1.8.2/openmrs-api-1.8.2-tests.jar; error in opening zip file
[ERROR] error reading /home/m0dz3r0/.m2/repository/org/openmrs/web/openmrs-web/1.8.2/openmrs-web-1.8.2-tests.jar; error in opening zip file
[ERROR] error reading /home/m0dz3r0/.m2/repository/org/springframework/spring-test/3.0.5.RELEASE/spring-test-3.0.5.RELEASE.jar; error in opening zip file
[ERROR] error reading /home/m0dz3r0/.m2/repository/commons-logging/commons-logging/1.1/commons-logging-1.1.jar; error in opening zip file
[ERROR] error reading /home/m0dz3r0/.m2/repository/logkit/logkit/1.0.1/logkit-1.0.1.jar; error in opening zip file
[ERROR] error reading /home/m0dz3r0/.m2/repository/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar; error in opening zip file
[ERROR] error reading /home/m0dz3r0/.m2/repository/net/sourceforge/jtds/jtds/1.2.2/jtds-1.2.2.jar; error in opening zip file
[ERROR] error reading /home/m0dz3r0/.m2/repository/com/h2database/h2/1.2.135/h2-1.2.135.jar; error in opening zip file
[ERROR] error reading /home/m0dz3r0/.m2/repository/org/openmrs/api/openmrs-api/1.8.2/openmrs-api-1.8.2-tests.jar; error in opening zip file
[ERROR] error reading /home/m0dz3r0/.m2/repository/org/openmrs/web/openmrs-web/1.8.2/openmrs-web-1.8.2-tests.jar; error in opening zip file
[ERROR] error reading /home/m0dz3r0/.m2/repository/org/springframework/spring-test/3.0.5.RELEASE/spring-test-3.0.5.RELEASE.jar; error in opening zip file
[ERROR] error reading /home/m0dz3r0/.m2/repository/commons-logging/commons-logging/1.1/commons-logging-1.1.jar; error in opening zip file
[ERROR] error reading /home/m0dz3r0/.m2/repository/logkit/logkit/1.0.1/logkit-1.0.1.jar; error in opening zip file
[ERROR] error reading /home/m0dz3r0/.m2/repository/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar; error in opening zip file
[ERROR] error reading /home/m0dz3r0/.m2/repository/net/sourceforge/jtds/jtds/1.2.2/jtds-1.2.2.jar; error in opening zip file
[ERROR] error reading /home/m0dz3r0/.m2/repository/com/h2database/h2/1.2.135/h2-1.2.135.jar; error in opening zip file
[ERROR] /home/m0dz3r0/Program Files/eclipse/workspace/helloworld/api/src/test/java/org/openmrs/module/helloworld/api/HelloWorldServiceTest.java:[19,24] package org.openmrs.test does not exist
[ERROR] /home/m0dz3r0/Program Files/eclipse/workspace/helloworld/api/src/test/java/org/openmrs/module/helloworld/api/HelloWorldServiceTest.java:[24,45] cannot find symbol
[ERROR] symbol: class BaseModuleContextSensitiveTest
[ERROR] -> [Help 1]
I know the community is kind of busy now but these errors are driving me crazy. Any help will be appreciated. Thanks
Seems to contain corrupted libraries that am thinking were not successfully downloaded, i would suggest you delete /home/m0dz3r0/.m2/repository and re-run the mvn clean install command, otherwise manually look up each of those libraries independently, try opening the compressed files/.jar files and you will see what i mean! then manually delete their folders one after another, let us know how it goes.
I think my problem started when i first installed OpenMRS. I was having test failures so i skipped the test but it seems some part of the application needed those tests. I deleted everything in my repository did a git clone again on the core api. So i am trying to install without skipping these tests. The build fails saying there are test failures. I looked at the test reports and found the test case that was failing. But when i run this test case in eclipse, i get no failures. More details:
Am currently experiencing this very error while installing a clean instance of OpenMRS sdk with no tests skipped:
[INFO] Running org.openmrs.api.UserServiceTest
[ERROR] Tests run: 109, Failures: 1, Errors: 0, Skipped: 1, Time elapsed: 6.879 s <<< FAILURE! - in org.openmrs.api.UserServiceTest
[ERROR] getAllUsers_shouldNotContainsAnyDuplicateUsers Time elapsed: 0.09 s <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <11> but was: <12>
at org.openmrs.api.UserServiceTest.getAllUsers_shouldNotContainsAnyDuplicateUsers(UserServiceTest.java:680)