Unable to build openmrs-module-coreapps with maven due to failed/unresolved maven dependency

[INFO] Scanning for projects… Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/distro/referenceapplication/2.4-SNAPSHOT/referenceapplication-2.4-SNAPSHOT.pom [ERROR] The build could not read 1 project -> [Help 1] [ERROR]
[ERROR] The project org.openmrs.module:coreapps:1.10 (/Users/chrismanning/Projects/openmrs-module-coreapps/pom.xml) has 1 error [ERROR] Non-resolvable import POM: Could not find artifact org.openmrs.distro:referenceapplication:pom:2.4-SNAPSHOT in openmrs-repo (http://mavenrepo.openmrs.org/nexus/content/repositories/public) @ line 47, column 22 -> [Help 2] [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/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

I resolved this error by removing -SNAPSHOT from the distro.version property. Probably because I checked out tags/1.10 branch and at the time of development, distro 2.4 was still in development and -SNAPSHOT is no longer available. However, I am now working on this error:

[INFO] ------------------------------------------------------------------------ [INFO] Building Core Apps Module API 1.10 [INFO] ------------------------------------------------------------------------ Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.pom Downloaded: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.pom (0 B at 0.0 KB/sec) Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-plugins/19/maven-plugins-19.pom Downloaded: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-plugins/19/maven-plugins-19.pom (0 B at 0.0 KB/sec) Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.jar Downloaded: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.jar (0 B at 0.0 KB/sec) Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-surefire-plugin/2.10/maven-surefire-plugin-2.10.pom Downloaded: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-surefire-plugin/2.10/maven-surefire-plugin-2.10.pom (0 B at 0.0 KB/sec) Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/surefire/surefire/2.10/surefire-2.10.pom Downloaded: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/surefire/surefire/2.10/surefire-2.10.pom (0 B at 0.0 KB/sec) Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-surefire-plugin/2.10/maven-surefire-plugin-2.10.jar Downloaded: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-surefire-plugin/2.10/maven-surefire-plugin-2.10.jar (0 B at 0.0 KB/sec) [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Core Apps Module … SUCCESS [1.842s] [INFO] Core Apps Module API … FAILURE [3.298s] [INFO] coreapps Module web 1.9 … SKIPPED [INFO] coreapps Module web 2.0 … SKIPPED [INFO] Core Apps Module OMOD … SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 8.463s [INFO] Finished at: Mon Aug 08 12:47:59 EDT 2016 [INFO] Final Memory: 15M/225M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project coreapps-api: Could not resolve dependencies for project org.openmrs.module:coreapps-api:jar:1.10: Failed to collect dependencies for [org.openmrs.api:openmrs-api:jar:1.11.6 (provided), org.openmrs.web:openmrs-web:jar:1.11.6 (provided), org.openmrs.api:openmrs-api:jar:tests:1.11.6 (test), org.openmrs.web:openmrs-web:jar:tests:1.11.6 (test), org.openmrs.test:openmrs-test:pom:1.11.6 (test), org.openmrs.module:appframework-api:jar:2.8 (provided), org.openmrs.module:emrapi-api:jar:1.14 (provided), org.openmrs.module:emrapi-api-1.10:jar:1.14 (provided), org.openmrs.module:emrapi-api-1.11:jar:1.14 (provided), org.openmrs.module:emrapi-api:jar:tests:1.14 (test), org.openmrs.module:providermanagement-api:jar:2.4 (provided), org.openmrs.module:uiframework-api:jar:3.6 (provided), org.openmrs.module:reporting-api:jar:0.10.0 (provided), org.openmrs.module:serialization.xstream-api:jar:0.2.10 (provided), org.openmrs.module:calculation-api:jar:1.1 (provided), org.openmrs.module:appui-api:jar:tests:1.5.1 (test), org.openmrs.module:htmlformentry-api-1.10:jar:2.6 (provided), org.openmrs.module:htmlformentry-api:jar:tests:2.6 (test), org.openmrs:event-api:jar:2.4 (test), org.openmrs:event-api-1.x:jar:2.4 (test), org.openmrs:event-api-2.x:jar:2.4 (test)]: Failed to read artifact descriptor for org.openmrs.module:emrapi-api:jar:1.14: Failure to find org.openmrs.distro:referenceapplication:pom:2.4-SNAPSHOT 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] [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/DependencyResolutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :coreapps-api

Process finished with exit code 1

1 Like

Am very short on time, so I decided to just build from master which appears to be working. Not sure exactly why I can’t build from a specific tag after

git checkout tags/1.10