java - 尝试在 Intellij Idea 中构建 gradle 项目时出错
问题描述
我正在尝试在 Coursera 上完成 Java Spring 课程,并使用此 gradle 文件下载了该项目。
buildscript {
ext {
springBootVersion = '2.1.0.RELEASE'
}
repositories {
maven { url "https://repo.spring.io/libs-snapshot" }
mavenLocal()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.0.2.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: 'war'
sourceCompatibility = 1.8
targetCompatibility = 1.8
war {
baseName = 'gs-convert-jar-to-war'
version = '0.1.0'
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/libs-snapshot" }
maven { url "http://maven.springframework.org/milestone" }
flatDir {
dirs 'lib'
}
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.boot:spring-boot-starter-aop")
compile("org.springframework.boot:spring-boot-starter-test")
compile("org.springframework.boot:spring-boot-starter-jetty")
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("org.springframework.data:spring-data-rest-webmvc")
compile("org.apache.httpcomponents:httpclient:4.5.6")
compile("org.hsqldb:hsqldb")
compile("com.google.guava:guava:17.0")
compile("org.apache.commons:commons-lang3:3.3.2")
compile("com.squareup.retrofit:retrofit:1.6.0")
compile("commons-io:commons-io:2.4")
compile("com.github.davidmarquis:fluent-interface-proxy:1.3.0")
compile(":mobilecloud.handin:1.0.0")
compile(":video.up.test:1.0.0")
compile(":autograder.handin:1.0.0")
compile(":autograder.spec:1.0.0")
testCompile("junit:junit")
}
不幸的是,我在 IntelliJ Idea 中有这个错误:
A problem occurred configuring root project 'mobile-cloud-asgn1'.
> Failed to notify project evaluation listener.
> org.gradle.api.tasks.SourceSetOutput.getClassesDir()Ljava/io/File;
我是 Java 和 Gradle 的新手,从来没有遇到过这样的错误,所以我不知道如何修复它。谁能帮我?
带有项目模板的 PS 存储库:https ://github.com/juleswhite/mobile-cloud-asgn1
解决方案
推荐阅读
- python - 为什么我会得到这些回溯?
- python - 当在 Tkinter 中没有输入而取消选择输入字段时,使占位符重新出现
- angular - Angular2 StrategyPattern 注入服务
- java - 当我尝试将图像添加到窗格时,图像不可见
- webassembly - 内存访问越界——但为什么呢?
- javascript - 我的图标没有显示并且我的响应式菜单没有显示
- c++ - 将 mqtt_cpp 库添加到 cmake 项目
- java - 如何在不知道列的情况下将“io.vertx.mutiny.sqlclient.Rowset”转换为地图列表?
- java - 部署到 jar 后获取 java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
- reactjs - 在 React 中访问浏览器扩展