简体   繁体   English

Spring Boot Java App的Gradlew Clean构建失败

[英]Gradlew clean build is failed for spring boot java app

I have downloaded Gradle 4.1 and kept GRADLE_HOME env setting and tried to gradlew clean build . 我已经下载了Gradle 4.1并保持了GRADLE_HOME env设置,并试图gradlew clean build

It is failing with the following exception 它失败,并带有以下异常

A problem occurred configuring root project '_app_'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve org.pitest:pitest-command-line:1.1.10.
     Required by:
         project :
      > Could not resolve org.pitest:pitest-command-line:1.1.10.
         > Could not initialize class org.gradle.internal.resource.transport.http.AlwaysRedirectRedirectStrategy
      > Could not resolve org.pitest:pitest-command-line:1.1.10.
         > Could not initialize class org.gradle.internal.resource.transport.http.AlwaysRedirectRedirectStrategy
   > Could not resolve info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.1.10.
     Required by:
         project :
      > Could not resolve info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.1.10.
         > Could not initialize class org.gradle.internal.resource.transport.http.AlwaysRedirectRedirectStrategy
      > Could not resolve info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.1.10.
         > Could not initialize class org.gradle.internal.resource.transport.http.AlwaysRedirectRedirectStrategy
   > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:1.5.6.RELEASE.
     Required by:
         project :
      > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:1.5.6.RELEASE.
         > Could not initialize class org.gradle.internal.resource.transport.http.AlwaysRedirectRedirectStrategy
      > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:1.5.6.RELEASE.
         > Could not initialize class org.gradle.internal.resource.transport.http.AlwaysRedirectRedirectStrategy

When I ran the same in debug mode I could see this 当我在调试模式下运行相同命令时,我可以看到

14:18:09.950 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has finished executing the build.
14:18:10.013 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientInputForwarder] Dispatching close input message: org.gradle.launcher.daemon.protocol.CloseInput@de542e
14:18:10.013 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 10: dispatching class org.gradle.launcher.daemon.protocol.CloseInput
14:18:10.013 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClient] Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring root project '_app_'.] from daemon DaemonInfo{pid=7464, address=[093d98c5-c3fb-4d52-8769-f354b16ed886 port:59558, addresses:[/127.0.0.1]], state=Idle, lastBusy=1504514729826, context=DefaultDaemonContext[uid=1fa87ce9-9184-48a6-9489-499fe27fffa0,javaHome=C:\Program Files (x86)\Java\jdk1.8.0_131,daemonRegistryDir=D:\Users\RMuthu\.gradle\daemon,pid=7464,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
14:18:10.013 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: dispatching class org.gradle.launcher.daemon.protocol.Finished
14:18:10.013 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: connection stop
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true

Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve org.pitest:pitest-command-line:1.1.10.
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingModuleComponentRepository$ErrorHandlingModuleComponentRepositoryAccess.resolveComponentMet
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentMetaDataResolveState.process(ComponentMetaDataResolveState.java:66)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentMetaDataResolveState.resolve(ComponentMetaDataResolveState.java:58)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver.findBestMatch(RepositoryChainComponentMetaDataResolver.java:13
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver.findBestMatch(RepositoryChainComponentMetaDataResolver.java:11
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver.resolveModule(RepositoryChainComponentMetaDataResolver.java:89
        ... 20 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.gradle.internal.resource.transport.http.AlwaysRedirectRedirectStrategy

我重新安装了Java,问题解决了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用./gradlew appRun运行Spring Boot应用程序 - Running a Spring Boot app using ./gradlew appRun Spring 引导 - gradlew 测试失败 || 无法加载 ApplicationContext - Spring Boot - gradlew test failed || Failed to load ApplicationContext 使用pom.xml和app.java的简单spring-boot应用程序显示构建失败错误 - Simple spring-boot application with pom.xml and app.java is showing build failed error 通过gradle构建spring boot应用程序docker镜像:添加失败: - Build spring boot app docker image by gradle: ADD failed: spring 引导应用程序启动在 java 11 中失败,带有 gradle - spring boot app startup failed in java 11 with gradle Maven全新安装构建失败:Spring Boot- MVC,JPA - Maven Clean Install build fails: Spring Boot- MVC, JPA 在gradle清洁测试时,Activiti + Spring Boot + Gradle构建挂起 - Activiti + Spring Boot + Gradle build hangs while gradle clean test 构建失败 Spring 未找到引导插件 - Build failed Spring Boot Plugin was not found 使用 Java 模块时 Spring `superinterface check failed`(对于 Axon Framework Spring Boot 应用程序) - Spring `superinterface check failed` when using Java modules (for Axon Framework Spring Boot app) 更改属性文件后,Maven无法构建Spring Boot应用程序(无法解析配置类) - Maven can not build spring boot app after properties file has been changed (Failed to parse configuration class)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM