如何让 IntelliJ IDEA 从 Maven 更新我的依赖项? [英] How can I make IntelliJ IDEA update my dependencies from Maven?

查看:50
本文介绍了如何让 IntelliJ IDEA 从 Maven 更新我的依赖项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在项目的 pom.xml 中手动添加依赖项时,让 Maven 下载依赖项并让 IntelliJ 构建模块,IntelliJ 抱怨缺少库.同时Maven可以找到依赖的JAR并构建项目.

When I manually add dependencies in the pom.xml of my project, let Maven download the dependencies and let IntelliJ build the module, IntelliJ complains about missing libraries. At the same time Maven can find the dependent JARs and build the project.

如何告诉 IntelliJ 使用 Maven 下载的库?

How can I tell IntelliJ to use the libs which are downloaded by Maven?

推荐答案

您不必每次都手动重新导入.您可以启用自动导入 如此处所述. 在设置中更改此设置 -> Maven -> 自动导入 Maven 项目.

You don't have to reimport manually each time. You can enable auto-import as documented here. Change this in Settings -> Maven -> Import Maven projects automatically.

这篇关于如何让 IntelliJ IDEA 从 Maven 更新我的依赖项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆