$ infer -- ./gradlew build --stacktrace
20 Capturing in gradle mode...
21 2020-07-01T09:09:20.168+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
22 2020-07-01T09:09:20.168+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
23 2020-07-01T09:09:20.169+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
24 2020-07-01T09:09:20.169+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
25 2020-07-01T09:09:20.169+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] A problem occurred configuring root project 'ParkManage'.
26 2020-07-01T09:09:20.169+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not resolve all artifacts for configuration ':classpath'.
27 2020-07-01T09:09:20.169+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not download bcpkix-jdk15on-1.56.jar (org.bouncycastle:bcpkix-jdk15on:1.56)
28 2020-07-01T09:09:20.170+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not get resource 'https://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.56/bcpkix-jdk15on-1.56.jar'.
29 2020-07-01T09:09:20.170+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not GET 'https://d29vzk4ow07wi7.cloudfront.net/7043dee4e9e7175e93e0b36f45b1ec1ecb893c5f755667e8b916eb8dd201c6ca?response-content-disposition=attachment%3Bfilename%3D%22bcpkix-jdk15on-1.56.jar%22&Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHAqOi8vZDI5dnprNG93MDd3aTcuY2xvdWRmcm9udC5uZXQvNzA0M2RlZTRlOWU3MTc1ZTkzZTBiMzZmNDViMWVjMWVjYjg5M2M1Zjc1NTY2N2U4YjkxNmViOGRkMjAxYzZjYT9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPWF0dGFjaG1lbnQlM0JmaWxlbmFtZSUzRCUyMmJjcGtpeC1qZGsxNW9uLTEuNTYuamFyJTIyIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNTkzNTY1NTg4fSwiSXBBZGRyZXNzIjp7IkFXUzpTb3VyY2VJcCI6IjAuMC4wLjAvMCJ9fX1dfQ__&Signature=p2PxweuJM6CNGplttqBsDd0d7-fG3Vbhu16Pd~Bq~-Z2tmpHlp1Ftl2VJu~p9bMfSXAkytw3kv7m~MQv2U~tTRdAWUNHGv2hUbmy8vT0eaKGPmV3UQL6qTW62qhmdOZIev-D13EmZIbPqdSpn0a3TS2W2G3cvr1IYcXSNukcVR6IDkEIw7LPzOeav5s5salkJOhxED3Rw7152NGKjPz7Na9BJNbmKo0LMCzLfRQgvTnB7gwhUfdDsPAIIIBAd2Lafg5m4reGzgJT6D6LYV7k5KkLMFVh~D6e7yhYNLOVSpOUhtWhAU0FEdZM~KWaRW40v2JzSL-3Tp0FycPww9amHQ__&Key-Pair-Id=APKAIFKFWOMXM2UMTSFA'.
30 2020-07-01T09:09:20.170+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Received close_notify during handshake
31 2020-07-01T09:09:20.171+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not download bcprov-jdk15on-1.56.jar (org.bouncycastle:bcprov-jdk15on:1.56)
32 2020-07-01T09:09:20.171+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not get resource 'https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.jar'.
33 2020-07-01T09:09:20.171+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not GET 'https://d29vzk4ow07wi7.cloudfront.net/963e1ee14f808ffb99897d848ddcdb28fa91ddda867eb18d303e82728f878349?response-content-disposition=attachment%3Bfilename%3D%22bcprov-jdk15on-1.56.jar%22&Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHAqOi8vZDI5dnprNG93MDd3aTcuY2xvdWRmcm9udC5uZXQvOTYzZTFlZTE0ZjgwOGZmYjk5ODk3ZDg0OGRkY2RiMjhmYTkxZGRkYTg2N2ViMThkMzAzZTgyNzI4Zjg3ODM0OT9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPWF0dGFjaG1lbnQlM0JmaWxlbmFtZSUzRCUyMmJjcHJvdi1qZGsxNW9uLTEuNTYuamFyJTIyIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNTkzNTY1NjI4fSwiSXBBZGRyZXNzIjp7IkFXUzpTb3VyY2VJcCI6IjAuMC4wLjAvMCJ9fX1dfQ__&Signature=IUE7mM~4DnmBgAZSX6jSbnrX87zJoi4d3UCkVxORxxRPO97DpatijHrss-XJmpT29d~vROev8H3EH~FFxlC4JET-VcEnWUDSTIHzIwyKJUnOlA4k8Tm28uputgOin9OfBrGx1Y6K5SIaNBrOEUpnBGvv8dgMG2~tYBqGHyjSrbBmBI-EMGWjj4tWmsHJ8-6tn9KH7e0PYusIbUPduT3tM~-~-Gts787coAJaUBYeWoglB-nCseE-qbFCQYGQExRplbRNpeQLtmVmqBiVZZPNPOP~ASKifcM4tPyh37c4WLWDDxKRluRRZzf~ZVQpP77n8ofot7uwY5ro8TQDvsq27A__&Key-Pair-Id=APKAIFKFWOMXM2UMTSFA'.
34 2020-07-01T09:09:20.171+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Received close_notify during handshake
35 2020-07-01T09:09:20.171+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not download fastutil-7.2.0.jar (it.unimi.dsi:fastutil:7.2.0)
36 2020-07-01T09:09:20.171+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not get resource 'https://jcenter.bintray.com/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.jar'.

原因:SSL握手失败,因为我们的扫描环境在公司内网中,扫描环境无法连接到仓库,导致下载依赖失败。

解决办法:在build.gradle文件中更镜像仓库即可,脚本如下:

allprojects {
repositories {
//google()
//jcenter()
mavenCentral()
google()
maven {url 'http://maven.xxxx.cn/repository/maven-aliyun/'}
maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}

}
}