有谁能告诉我如何在gradle中做类似于maven install -U
(更新依赖项)的事情。
我在build.gradle文件中添加了新的依赖项有问题
dependencies {
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-thymeleaf')
compile('org.springframework.boot:spring-boot-starter-web')
compile("org.springframework.boot:spring-boot-starter-security")
runtime('com.h2database:h2')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
新的依赖性是:
compile("org.springframework.boot:spring-boot-starter-security")
在构建或项目同步期间,我的IntelliJ (版本14)甚至没有尝试下载这个新的依赖项(我使用的是gradle版本2.5)。
在maven项目中,IntelliJ有类似于下载maven依赖项的内容。但对Gradle来说,我没有看到这样的事情。这就像我的项目看起来
有谁能告诉我为什么我没有像maven那样在项目列表中看到任何*.jar?
发布于 2015-11-08 14:34:34
使用 IntelliJ
在“分级工具”窗口中,单击“刷新”按钮。这是屏幕:
使用终端
必须将这一行添加到build.gradle
中
apply plugin: 'idea'
接下来,如果要添加一些依赖项,并且希望同步IntelliJ,只需使用命令
gradle idea
https://stackoverflow.com/questions/33594005
复制相似问题