I tried to run nab-example from here and got an error when building the project with maven clean package
Error:
[ERROR] The project ru.hh.nab:nab-example:10.1.4-SNAPSHOT (C:\Users\╨Ь╨░╨║\IdeaProjects\nuts-and-bolts\nab-example\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for ru.hh.nab:nuts-and-bolts-parent:10.1.4-SNAPSHOT: The following artifacts could not be resolved: ru.hh.public-pom:public-pom:pom:1.57.2 (ab
sent): Could not transfer artifact ru.hh.public-pom:public-pom:pom:1.57.2 from/to hh-public (): PKIX path building failed: sun.
security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at wrong local POM @ ru.hh.nab:nuts-and-bolts-parent:10.1.4-SNAPSHOT, C:\Users\╨Ь╨░╨║\IdeaProjects\nuts-and-bolts\pom.xml, line 5, column 13 -> [Help 2]
I tried to add certificate like in this answer and ignore certificate like here but got the same error. I use jdk-21 and windows 11. Computer is my own and i believe that i don't have proxies
I tried to run nab-example from here and got an error when building the project with maven clean package
Error:
[ERROR] The project ru.hh.nab:nab-example:10.1.4-SNAPSHOT (C:\Users\╨Ь╨░╨║\IdeaProjects\nuts-and-bolts\nab-example\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for ru.hh.nab:nuts-and-bolts-parent:10.1.4-SNAPSHOT: The following artifacts could not be resolved: ru.hh.public-pom:public-pom:pom:1.57.2 (ab
sent): Could not transfer artifact ru.hh.public-pom:public-pom:pom:1.57.2 from/to hh-public (https://m2.hh.ru/content/repositories/public-releases): PKIX path building failed: sun.
security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at wrong local POM @ ru.hh.nab:nuts-and-bolts-parent:10.1.4-SNAPSHOT, C:\Users\╨Ь╨░╨║\IdeaProjects\nuts-and-bolts\pom.xml, line 5, column 13 -> [Help 2]
I tried to add certificate like in this answer and ignore certificate like here but got the same error. I use jdk-21 and windows 11. Computer is my own and i believe that i don't have proxies
This is a pretty common issue — mainly because Java uses its own keystore, separate from the OS.
And for such a small and frequent problem, Java’s built-in tooling makes it a real headache to fix.
Normally, you’d need to:
1. Obtain the certificate from the repository server
2. Download and convert it
3. Use the keytool with a small novel’s worth of parameters to import it correctly into the Java keystore
That’s why I built a tool to make this whole process more convenient: jssl.
(see https://github.com/pmamico/jssl)
Instead of all the hassle, you can just run:
mvn clean install | jssl doctor
Of course, you’ll need to install jssl once beforehand. But after that, whenever you hit a PKIX error again, you’ll be able to resolve it in seconds.
Hope this saves someone a few hours of pain.
pom.xml
m2.hh.ru/content/repositories/public-releases isn't accessible. – Raghuram Commented Jan 7 at 10:08