![](/img/trans.png)
[英]Intellij Idea - Gradle: Execution failed for task ':compileJava'
[英]Execution failed for task ':compileJava'. Gradle
我正在尝试在 eclipse 中设置我的第一个 gradle 项目,但是我在构建 gradle 时遇到了问题。 我已经从 spring.io 复制了 build.gradle,但它仍然无法正确构建。 我收到任务“:compileJava”的执行失败。 我的 build.gradle 文件看起来像这样
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.1.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
jar {
baseName = 'gs-spring-boot'
version = '0.1.0'
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
// tag::jetty[]
compile("org.springframework.boot:spring-boot-starter-web") {
exclude module: "spring-boot-starter-tomcat"
}
compile("org.springframework.boot:spring-boot-starter-jetty")
// end::jetty[]
// tag::actuator[]
compile("org.springframework.boot:spring-boot-starter-actuator")
// end::actuator[]
testCompile("junit:junit")
}
如上所述,您的构建无法编译
Compilation failed; see the compiler error output for details.
检查代码并找出导致它无法构建的原因。 尝试使用-s -i
选项运行命令以找出问题所在。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.