---
title: "gradle issue"
author: "maxer025"
date: "2026-06-30T15:11:52Z"
tags: []
categories: ["开源软件"]
slug: "gradle-issue"
draft: false
lastmod: "2026-06-30T15:18:39Z"
id: 2540550
url: "https://maxer025.iteye.com/blog/2540550"
---

C:\2026\temp\SGO\sgo>gradlew build war
Downloading https://services.gradle.org/distributions/gradle-2.9-all.zip

Exception in thread "main" javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at sun.security.ssl.Alert.createSSLException(Alert.java:131)
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:331)

 download gradle-2.9-all.zip 


:compileJava

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not resolve org.slf4j:slf4j-api:1.6.1.
  Required by:
      com.arris.solutions-development:services-gateway-ops:1.22.08-RELEASE
   > Could not resolve org.slf4j:slf4j-api:1.6.1.
      > Could not get resource 'https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.pom'.
         > Could not GET 'https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.pom'.
            > peer not authenticated


Java 8 and earlier: JAVA_HOME/jre/lib/security/cacerts
Java 11 and later: JAVA_HOME/lib/security/cacertsRun the following command (replace paths with your actual file paths):bash
keytool -import -alias my-target-server -keystore "PATH_TO_YOUR_JDK/lib/security/cacerts" -file "PATH_TO_EXPORTED/server.cer"

windows power shell 
keytool -import -alias my-target-server -keystore "C:/jdk8.0.482/jre/lib/security/cacerts" -file "C:/Users/JHE2/Desktop/temp/repo1.maven.org.crt" 

changeit

Trust this certificate? :  y
Certificate was added to keystore