无法从gradle下载插件

时间:2017-03-22 07:39:52

标签: java gradle build build.gradle gradlew

您好我已经在我的Windows 7机器上安装了gradle。我需要下载一些插件。我在公司网络下,所以我设置了我的代理设置,并在JDK上安装了一些证书。我的build.gradle文件看起来像这样..

plugins {
  id "com.moowork.node" version "1.1.1"
   id "com.moowork.grunt" version "1.1.1"
   id "com.craigburke.bower-installer" version "2.5.1"
}
task hello {
    doLast {
        println 'Hello world!'
    }
} 

每当我建立我的gradle时,我都会遇到以下错误..

NEGOTIATE authentication error: No valid credentials provided (Mechanism level: No valid credentials prov ided (Mechanism level: Failed to find any Kerberos tgt))

FAILURE: Build failed with an exception.

* Where: Build file 'C:\Users\UserName\GradleBuild\build.gradle' line: 4

* What went wrong: Error resolving plugin [id: 'com.craigburke.bower-installer', version: '2.5.1']
> The response from https://plugins.gradle.org/api/gradle/3.4.1/plugin/use/com.craigburke.bower-installer /2.5.1 was not a valid response from a Gradle Plugin Resolution Service: content type is 'text/html; char set=utf-8', expected 'application/json' (status code: 500)

* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log ou tput.

BUILD FAILED

Total time: 2.143 secs

这是我的堆栈跟踪...

> Connecting to Daemon NEGOTIATE authentication error: No valid credentials provided (Mechanism level: No valid credentials prov ided (Mechanism level: Failed to find any Kerberos tgt))

FAILURE: Build failed with an exception.

* Where: Build file 'C:\Users\SwarnaAr\GradleBuild\build.gradle' line: 4

* What went wrong: Error resolving plugin [id: 'com.craigburke.bower-installer', version: '2.5.1']
> The response from https://plugins.gradle.org/api/gradle/3.4.1/plugin/use/com.craigburke.bower-installer /2.5.1 was not a valid response from a Gradle Plugin Resolution Service: content type is 'text/html; char set=utf-8', expected 'application/json' (status code: 500)

* Try: Run with --info or --debug option to get more log output.

* Exception is: org.gradle.api.GradleException: Error resolving plugin [id: 'com.craigburke.bower-installer', version: '2 .5.1']
        at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolveToFoundResult(DefaultPlug inRequestApplicator.java:236)
        at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.access$000(DefaultPluginRequestA pplicator.java:63)
        at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator$1.transform(DefaultPluginRequest Applicator.java:90)
        at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator$1.transform(DefaultPluginRequest Applicator.java:88)
        at org.gradle.util.CollectionUtils.collect(CollectionUtils.java:189)
        at org.gradle.util.CollectionUtils.collect(CollectionUtils.java:184)
        at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.applyPlugins(DefaultPluginReques tApplicator.java:88)
        at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPlugin Factory.java:156)
        at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:39)
        at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
        at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsPro jectEvaluator.java:34)
        at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluat or.java:70)
        at org.gradle.configuration.project.LifecycleProjectEvaluator.access$000(LifecycleProjectEvaluato r.java:33)
        at org.gradle.configuration.project.LifecycleProjectEvaluator$1.execute(LifecycleProjectEvaluator .java:53)
        at org.gradle.configuration.project.LifecycleProjectEvaluator$1.execute(LifecycleProjectEvaluator .java:50)
        at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.j ava:106)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.j ava:61)
        at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator. java:50)
        at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:599)
        at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:125)
        at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35)
        at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java :60)
        at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:38)
        at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuildAction.execute(DefaultGradleLaun cher.java:233)
        at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuildAction.execute(DefaultGradleLaun cher.java:230)
        at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.j ava:106)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.j ava:56)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:160)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:102)
        at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:71)
        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.jav a:28)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.jav a:41)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.jav a:26)
        at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActi onExecuter.java:75)
        at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActi onExecuter.java:49)
        at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBui ldActionExecuter.java:49)
        at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBui ldActionExecuter.java:31)
        at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.ja va:120)
        at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.jav a:47)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.ja va:120)
        at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.j ava:26)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.ja va:120)
        at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSing leUsedDaemon.java:34)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.ja va:120)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
        at org.gradle.util.Swapper.swap(Swapper.java:38)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.ja va:120)
        at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.ja va:120)
        at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.ja va:120)
        at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnviron ment.java:72)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.ja va:120)
        at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWi thBusy.java:50)
        at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297 )
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy. java:63)
        at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46) Caused by: org.gradle.plugin.use.resolve.service.internal.HttpPluginResolutionServiceClient$OutOfProtocol Exception: The response from https://plugins.gradle.org/api/gradle/3.4.1/plugin/use/com.craigburke.bower- installer/2.5.1 was not a valid response from a Gradle Plugin Resolution Service: content type is 'text/h tml; charset=utf-8', expected 'application/json' (status code: 500)
        at org.gradle.plugin.use.resolve.service.internal.HttpPluginResolutionServiceClient.request(HttpP luginResolutionServiceClient.java:92)
        at org.gradle.plugin.use.resolve.service.internal.HttpPluginResolutionServiceClient.queryPluginMe tadata(HttpPluginResolutionServiceClient.java:66)
        at org.gradle.plugin.use.resolve.service.internal.PersistentCachingPluginResolutionServiceClient$
1.create(PersistentCachingPluginResolutionServiceClient.java:60)
        at org.gradle.plugin.use.resolve.service.internal.PersistentCachingPluginResolutionServiceClient$
1.create(PersistentCachingPluginResolutionServiceClient.java:58)
        at org.gradle.plugin.use.resolve.service.internal.PersistentCachingPluginResolutionServiceClient. fetch(PersistentCachingPluginResolutionServiceClient.java:110)
        at org.gradle.plugin.use.resolve.service.internal.PersistentCachingPluginResolutionServiceClient. maybeFetch(PersistentCachingPluginResolutionServiceClient.java:103)
        at org.gradle.plugin.use.resolve.service.internal.PersistentCachingPluginResolutionServiceClient. maybeFetch(PersistentCachingPluginResolutionServiceClient.java:91)
        at org.gradle.plugin.use.resolve.service.internal.PersistentCachingPluginResolutionServiceClient. queryPluginMetadata(PersistentCachingPluginResolutionServiceClient.java:67)
        at org.gradle.plugin.use.resolve.service.internal.InMemoryCachingPluginResolutionServiceClient$1. create(InMemoryCachingPluginResolutionServiceClient.java:47)
        at org.gradle.plugin.use.resolve.service.internal.InMemoryCachingPluginResolutionServiceClient$1. create(InMemoryCachingPluginResolutionServiceClient.java:45)
        at org.gradle.plugin.use.resolve.service.internal.InMemoryCachingPluginResolutionServiceClient.ge tResponse(InMemoryCachingPluginResolutionServiceClient.java:76)
        at org.gradle.plugin.use.resolve.service.internal.InMemoryCachingPluginResolutionServiceClient.qu eryPluginMetadata(InMemoryCachingPluginResolutionServiceClient.java:42)
        at org.gradle.plugin.use.resolve.service.internal.DeprecationListeningPluginResolutionServiceClie nt.queryPluginMetadata(DeprecationListeningPluginResolutionServiceClient.java:48)
        at org.gradle.plugin.use.resolve.service.internal.PluginResolutionServiceResolver.resolve(PluginR esolutionServiceResolver.java:84)
        at org.gradle.plugin.use.resolve.internal.CompositePluginResolver.resolve(CompositePluginResolver .java:33)
        at org.gradle.plugin.use.resolve.internal.NotNonCorePluginOnClasspathCheckPluginResolver.resolve( NotNonCorePluginOnClasspathCheckPluginResolver.java:42)
        at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolveToFoundResult(DefaultPlug inRequestApplicator.java:234)
        ... 66 more


BUILD FAILED

我的调试日志

20:59:12.729 [DEBUG] [org.apache.http.impl.auth.HttpAuthenticator] Selected authentication options: [NEGO
TIATE, NTLM, BASIC [complete=true]]
20:59:12.729 [DEBUG] [org.apache.http.impl.conn.DefaultManagedHttpClientConnection] http-outgoing-17: Clo
se connection
20:59:12.729 [DEBUG] [org.apache.http.impl.conn.DefaultHttpClientConnectionOperator] Connecting to /11.16
4.4.21:8080
20:59:12.729 [DEBUG] [org.apache.http.impl.conn.DefaultHttpClientConnectionOperator] Connection establish
ed 25.162.3.130:56462<->11.164.4.21:8080
20:59:12.729 [DEBUG] [org.apache.http.impl.auth.HttpAuthenticator] Generating response to an authenticati
on challenge using Negotiate scheme
20:59:12.744 [DEBUG] [org.apache.http.impl.auth.SPNegoScheme] init XXXXXXX.com
20:59:12.744 [WARN] [org.apache.http.impl.auth.HttpAuthenticator] NEGOTIATE authentication error: No vali
d credentials provided (Mechanism level: No valid credentials provided (Mechanism level: Failed to find a
ny Kerberos tgt))
20:59:12.744 [DEBUG] [org.apache.http.impl.auth.HttpAuthenticator] Generating response to an authenticati
on challenge using ntlm scheme
20:59:12.947 [DEBUG] [org.apache.http.impl.auth.HttpAuthenticator] Authentication succeeded
20:59:12.947 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Tunnel to target created.
20:59:12.947 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Enabled protocols: [TLSv1]
20:59:12.947 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Enabled cipher suites:[TLS_ECD
HE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH
_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE
_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SS
L_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, SS
L_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
20:59:12.947 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Starting handshake
20:59:13.448 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Secure session established

0 个答案:

没有答案