有没有人能告诉我如何在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,我没有看到类似的东西。我的项目看起来像这样。
有人可以告诉我为什么我在项目列表中看不到任何*.jar 文件,就像Maven那样吗?
idea
插件,使用apply plugin: 'idea'
语句。然后在添加新依赖项后运行gradle idea
命令,它会自动下载依赖项。 - Opal