zaq*_*otr 7 java intellij-idea gradle maven
任何人都可以告诉我如何maven install -U在 gradle 中执行类似(更新依赖项)的操作吗?
我有问题,我已向我的 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')
}
Run Code Online (Sandbox Code Playgroud)
新的依赖项是:
compile("org.springframework.boot:spring-boot-starter-security")
Run Code Online (Sandbox Code Playgroud)
在构建或项目同步期间,我的 IntelliJ(版本 14)甚至没有尝试下载这个新的依赖项(我正在使用 gradle 版本 2.5)
在 Maven 项目中,IntelliJ 有类似下载 Maven 依赖项的功能。但对于 Gradle 我没有看到这样的事情。这就像我的项目的样子
任何人都可以告诉我为什么我没有像 Maven 一样在项目列表中看到任何 *.jar 吗?

使用 IntelliJ
在 Gradle 工具窗口中,单击刷新按钮。这是屏幕:
使用终端
您必须添加到您的build.gradle这一行
apply plugin: 'idea'
Run Code Online (Sandbox Code Playgroud)
接下来,如果您要添加一些依赖项并且想要同步 IntelliJ,您只需使用命令
gradle idea
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9416 次 |
| 最近记录: |