【发布时间】:2021-10-21 16:47:58
【问题描述】:
我正在尝试向我的 pom.xml 添加依赖项并遇到一个问题:IntelliJ 错误
无法解析 jfugue:jfugue:5.0.9
我想添加的依赖是https://mvnrepository.com/artifact/jfugue/jfugue/5.0.9下面的这个
<!-- https://mvnrepository.com/artifact/jfugue/jfugue -->
<dependency>
<groupId>jfugue</groupId>
<artifactId>jfugue</artifactId>
<version>5.0.9</version>
</dependency>
只需将 xml-sn-p 从 maven 添加到我的 pom 并刷新或重新加载所有 maven 项目,我就可以毫无问题地添加其他依赖项。例如,我在同一个 pom 中有这个依赖,它工作正常:
<!-- https://mvnrepository.com/artifact/org.jsoup/jsoup -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.14.3</version>
</dependency>
不过在sn-p下面有一个注释,可以复制粘贴,https://mvnrepository.com/artifact/jfugue/jfugue/5.0.9
注意:此工件位于 SingGroup 存储库 (https://maven.sing-group.org/repository/maven/)
我需要在 pom 中添加什么,以便我可以在我的项目中使用该依赖项并消除错误?
无法解析 jfugue:jfugue:5.0.9
提前致谢。
【问题讨论】:
-
你需要让maven知道,它是如何找到工件的。由于它需要搜索 SingGroup 存储库,因此您还需要将该存储库信息添加到您的 pom 中。看看这个:maven.apache.org/guides/mini/guide-multiple-repositories.html
-
@Ankush 谢谢。