Could not transfer artifact org.openmrs.api:openmrs-api:pom:1.12.0 from/to openmrs-repo

Hi,

I am trying to override the uicommons module to change the header colors and logo.

I have forked the original https://github.com/openmrs/openmrs-module-uicommons into my git account and have cloned that to my dev machine windows 10.

I am using IntelliJ IDEA and just opening the project in maven and then creating a maven goal “mvn clean install -Dmaven.test.skip=true” on the root directory of UI commons module and executing it creates the following error.

[INFO] uicommons Module API ............................... FAILURE [ 17.285 s]

Could not transfer metadata org.apache.maven.plugins:maven-compiler-plugin/maven-metadata.xml from/to openmrs-repo (http://mavenrepo.openmrs.org/nexus/content/repositories/public): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Failure to transfer org.openmrs.api:openmrs-api:pom:1.12.0 from 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. Original error: Could not transfer artifact org.openmrs.api:openmrs-api:pom:1.12.0 from/to archetype (http://mavenrepo.openmrs.org/nexus/content/repositories/public): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Could not transfer artifact org.openmrs.api:openmrs-api:pom:1.12.0 from/to openmrs-repo (http://mavenrepo.openmrs.org/nexus/content/repositories/public): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I even tried it in the windows cmd console with the following error.

[INFO] Reactor Summary for UI Commons Module 2.15.0-SNAPSHOT:
[INFO]
[INFO] UI Commons Module .................................. SUCCESS [  1.898 s]
[INFO] uicommons Module API ............................... FAILURE [ 17.157 s]
[INFO] uicommons SCSS content ............................. SKIPPED
[INFO] uicommons Module OMOD .............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  20.111 s
[INFO] Finished at: 2020-07-21T19:16:26+12:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project uicommons-api: Could not resolve dependencies for project org.openmrs.module:uicommons-api:jar:2.15.0-SNAPSHOT: Failed to collect dependencies at org.openmrs.api:openmrs-api:jar:1.12.0: Failed to read artifact descriptor for org.openmrs.api:openmrs-api:jar:1.12.0: Could not transfer artifact org.openmrs.api:openmrs-api:pom:1.12.0 from/to openmrs-repo (http://mavenrepo.openmrs.org/nexus/content/repositories/public): Transfer failed for http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/api/openmrs-api/1.12.0/openmrs-api-1.12.0.pom: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [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 <args> -rf :uicommons-api

Any help is highly appreciated

Sanjeet

Upgrade your Java version to the latest in the 1.8.x series.

2 Likes

Many thanks Daniel, after hours of searching, I found out from your reply to one other thread that it required JAVA to be updated. I upgraded and it worked.

Thanks Sanjeet