如何强制intellij想法重读/更新pom文件中指定的所有依赖项?
当前回答
有两种方法可以做到。
1号路
进入文件>设置>构建,执行,部署>构建工具| Maven
选择“始终更新快照”
Apply和OK
2号路 mvn -U clean install
其他回答
打开“Maven Projects”选项卡/窗口,单击左上角的“Reimport All Maven Projects”,开始从它们的存储库中重新加载所有依赖项。状态栏显示该进程的相关信息。
是什么让你认为这是不正确的工作?也许任何依赖项都不能从存储库加载?
对于IntelliJ IDEA 14.0
项目>[您的项目名称]>右键单击> Maven >重新导入
这在2022年仍然是一个问题。
The option Setting > Maven > Always update snapshots no longer works in IDEA 2022.2.2, probably because Maven 3 frowns upon it and IntelliJ seems to not have updated the IDE to make it function. A simple solution might be to be able to add maven -U clean install as a custom target to the Lifecycle list in the IDEA Maven tab, but if it is possible it is not clear how to do it (even after googling for days). A not as nice but viable solution would be to go into the Terminal tool of IDEA and typing maven -U clean install, but IDEA does not expose the maven command in its Terminal by default and again it is not clear how to configure it so that it would.
按Ctrl+Shift+A找到动作,输入“reload”,会找到“reload All Maven Projects”。
在Mac上,使用⌘+ + a。
下面最左边的按钮(蓝色循环)也重新导入了所有的maven项目:
推荐文章
- 如何在POM.xml中引用环境变量?
- Android Studio中的。iml文件是什么?
- Maven project.build.directory
- Spring Boot -父pom,当你已经有一个父pom
- 为什么IntelliJ 13 IDEA从12版本升级后这么慢?
- 使用Maven复制文件的最佳实践
- Maven命令行如何指向特定的settings.xml为单个命令?
- intellij是否可以像在Eclipse中那样组织导入?
- 导入时无法解析符号
- 如何从IntelliJ IDEA搜索中排除文件扩展名?
- Maven依赖项失败,出现501错误
- IntelliJ IDEA输出窗口切割输出
- 如何让IntelliJ识别常见的Python模块?
- 如何在Intellij生成串行版本UID
- 如何同步项目到GitHub与Android工作室?