无法解决IntelliJ IDEA 2018.1中的依赖关系 [英] Unable to resolve dependencies in IntelliJ IDEA 2018.1

查看:407
本文介绍了无法解决IntelliJ IDEA 2018.1中的依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有Maven依赖管理的Java项目.我将其复制到另一个工作站并导入到IntelliJ IDEA.无法解析来自pom.xml文件的依赖关系. Maven集成插件已启用,但Maven的重新导入功能无效. .m2文件夹中的settings.xml文件:

I have a Java project with Maven dependency management. I copied it to another workstation and imported to IntelliJ IDEA. Dependencies from pom.xml file are not resolved. Maven Integration plugin is enabled, but Maven's Reimport function has no effect. settings.xml file in .m2 folder:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      https://maven.apache.org/xsd/settings-1.0.0.xsd">
</settings>

自动导入Maven项目选项设置为启用.我使用的是JDK版本1.8.0_171和Maven 3.5.4,它们是在IDE中手动设置路径的.

Import Maven projects automatically option is set to on. I use JDK version 1.8.0_171 and Maven 3.5.4, which I set path manually in IDE.

IDE信息:

IntelliJ IDEA 2018.1.5 (Community Edition)
Build #IC-181.5281.24, built on June 12, 2018
JRE: 1.8.0_152-release-1136-b39 x86
JVM: OpenJDK Server VM by JetBrains s.r.o
Windows 10 10.0

推荐答案

我将.m2文件夹下的存储库文件夹从我的计算机复制到第二个工作站,然后解决了Maven依赖性.

I copied repository folder under .m2 folder from my computer to second workstation and after that Maven dependencies are resolved.

这篇关于无法解决IntelliJ IDEA 2018.1中的依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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