У меня возникает следующая ошибка, когда я пытаюсь построить свой проект:
Failed to collect dependencies at org.msgpack:jackson-dataformat-msgpack:jar:0.8.17 -> com.fasterxml.jackson.core:jackson-databind:jar:2.9.9: Failed to read artifact descriptor for com.fasterxml.jackson.core:jackson-databind:jar:2.9.9: Could not transfer artifact com.fasterxml.jackson.core:jackson-databind:pom:2.9.9 from/to maven (https://repo1.maven.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Я прочитал, что проблема в http://repo1.maven.org/maven2 и мне нужно изменить его на https. Сделано это, все еще это не работает. Затем я нашел другое предложение в google -> добавить сертификат maven с помощью keytool & restart. Сделано это. Все еще не работает. Попросил коллегу прислать мне их репозиторий, и он сработал (из c, есть все зависимости). Затем я хотел ввести категории в наших тестах junit, поэтому я добавил плагин surefire, и на этот раз проблема похожа:
Unable to generate classpath: org.apache.maven.artifact.resolver.ArtifactResolutionException:
Unable to get dependency information for org.apache.maven.surefire:surefire-grouper:jar:2.12.4: Failed to retrieve POM for org.apache.maven.surefire:surefire-grouper:jar:2.12.4:
Could not transfer artifact org.apache.maven.surefire:surefire-grouper:pom:2.12.4 from/to maven (https://repo1.maven.org/maven2): sun.security.validator.ValidatorException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: u
nable to find valid certification path to requested target [ERROR] org.apache.maven.surefire:surefire-grouper:jar:2.12.4
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] maven (https://repo1.maven.org/maven2, releases=true, snapshots=true),
[ERROR] central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false),
[ERROR] apache.snapshots (http://repository.apache.org/snapshots, releases=false, snapshots=true)
[ERROR] Path to dependency:
[ERROR] 1) dummy:dummy:jar:1.0
[ERROR] 2) org.apache.maven.surefire:surefire-junit47:jar:2.12.4
[ERROR] 3) org.apache.maven.surefire:common-junit48:jar:2.12.4
Итак, я решил go и загрузить одну за другой, но это черт возьми, и я предпочитаю решить эту проблему, а не загружать все вручную.