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

1k Views Asked by At

I'm trying to download gnu.trove library, I have this dependency:

<!-- https://mvnrepository.com/artifact/gnu.trove/trove -->
<dependency>
    <groupId>gnu.trove</groupId>
    <artifactId>trove</artifactId>
    <version>3.0.3</version>
</dependency>

But I get this error:

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

Why? Should I add some other repository in pom.xml? Right now I have this repository listed:

<repository>
  <id>jcenter</id>
  <name>jcenter-bintray</name>
  <url>http://jcenter.bintray.com</url>
</repository>
3

There are 3 best solutions below

0
On

The correct dependency:

<dependency>
    <groupId>net.sf.trove4j</groupId>
    <artifactId>trove4j</artifactId>
    <version>3.0.3</version>
</dependency>
1
On

There is a note in mvn search Note: this artifact it located at TU-Darmstadt repository (http://zoidberg.ukp.informatik.tu-darmstadt.de/artifactory/public-releases/);

Maybe you shuld add this repository.

That's two ways for you to do this; 1.Open the settings.xml in ${Maven_Path}/conf/ and navigate to the <mirrors>...</mirrors>,then you can add the repository here(there may had some samples for help). 2.Edit you pom.xml,add repository in the tag <repositories>. e.g:

<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>

0
On

try adding the repo from mvnRepository

 <repository>
      <id>mvnrepository</id>
      <url>http://mvnrepository.com/artifact</url>
  </repository>