在中心找不到工件 gnu.trove:trove:jar:3.0.3

我正在尝试下载 gnu.trove 库,我有这个依赖项:


<!-- https://mvnrepository.com/artifact/gnu.trove/trove -->

<dependency>

    <groupId>gnu.trove</groupId>

    <artifactId>trove</artifactId>

    <version>3.0.3</version>

</dependency>

但我收到这个错误:


Could not find artifact gnu.trove:trove:jar:3.0.3 in central (https://repo.maven.apache.org/maven2)

为什么?我应该添加一些其他存储库吗pom.xml?现在我列出了这个存储库:


<repository>

  <id>jcenter</id>

  <name>jcenter-bintray</name>

  <url>http://jcenter.bintray.com</url>

</repository>


一只斗牛犬
浏览 106回答 3
3回答

慕后森

mvn search 中有一个注释Note: this artifact it located at TU-Darmstadt repository (http://zoidberg.ukp.informatik.tu-darmstadt.de/artifactory/public-releases/);也许你应该添加这个存储库。有两种方法可以做到这一点;1.打开settings.xml并${Maven_Path}/conf/导航到<mirrors>...</mirrors>,然后您可以在此处添加存储库(可能有一些示例以供帮助)。2.编辑你pom.xml,在标签中添加存储库<repositories>。例如:<resposity><id>zoidberg-nexus</id>              <name>Zoidberg Nexus</name>              <url>http://zoidberg.ukp.informatik.tu-darmstadt.de/artifactory/public-releases/</url>              <releases>                  <enabled>true</enabled>              </releases></resposity>

MYYA

尝试从 mvnRepository 添加存储库&nbsp;<repository>&nbsp; &nbsp; &nbsp; <id>mvnrepository</id>&nbsp; &nbsp; &nbsp; <url>http://mvnrepository.com/artifact</url>&nbsp; </repository>

MMTTMM

正确的依赖关系:<dependency>&nbsp; &nbsp; <groupId>net.sf.trove4j</groupId>&nbsp; &nbsp; <artifactId>trove4j</artifactId>&nbsp; &nbsp; <version>3.0.3</version></dependency>
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java