2017-03-01 164 views
0

我正在尝试在eclipse中设置我的第一个gradle项目,但是我在构建gradle时遇到了问题。我从spring.io中复制了build.gradle,但仍然无法正常构建。我得到执行失败的任务':compileJava'。我的build.gradle文件看起来像这样任务':compileJava'的执行失败。 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") 
} 
+0

什么是完整的输出?请使用“-s”参数来构建命令。 –

+0

@MartinLinha错误详情http://pastebin.com/PgAmm0Sx – Oceris

回答

0

您的作品不能编译,如前所述

Compilation failed; see the compiler error output for details.

检查代码,发现是什么原因导致它不建。尝试使用-s -i选项运行该命令以找出错误。

相关问题