andreasgk
andreasgk

Reputation: 713

Nexus doesn't download the complete artifact content from the Central repository

In our project we use the artifact

<dependency>
  <groupId>nl.jqno.equalsverifier</groupId>
  <artifactId>equalsverifier</artifactId>
  <version>1.7.5</version>
</dependency>

Everything works fine: Nexus downloads the same content as in http://repo1.maven.org/maven2/nl/jqno/equalsverifier/equalsverifier/1.7.5/ to its proxy repository. ('Download' column in artifact details on Nexus shows 'pom, jar')

Now, we switch to the newest version 2.0.2 of the artifact:

<dependency>
  <groupId>nl.jqno.equalsverifier</groupId>
  <artifactId>equalsverifier</artifactId>
  <version>2.0.2</version>
</dependency>

Then, when we try to build the project then the attempt fails. Nexus cannot resolve the artifact! It seems like Nexus didn't download the complete content of the artifact version ('Download' column in artifact details on Nexus shows 'pom, pom'). On the other site, when I look at the artifact in the Central repository, the content is as usual: http://repo1.maven.org/maven2/nl/jqno/equalsverifier/equalsverifier/2.0.2/.

What causes the problem with the newest artifact version? Why can't Nexus download it correctly?

Upvotes: 2

Views: 1251

Answers (2)

jqno
jqno

Reputation: 15530

Assuming crea1's answer didn't solve your problem:

Maybe something went wrong when Maven downloaded the artifact, causing Maven to "think" the artifact was downloaded anyway.

You can force Maven to try and download it again with mvn -U test.

If that doesn't work, try going into ~/.m2/repository (or wherever Maven stores its artifacts locally on your system), locating EqualsVerifier, removing the entire 2.0.2 folder, and calling Maven again.

Upvotes: 1

crea1
crea1

Reputation: 12627

You may have overlooked that your dependency is of type pom. This will only download the pom, because that's what you are asking for. Remove the <type> and you should get the jar aswell.

<dependency>
  <groupId>nl.jqno.equalsverifier</groupId>
  <artifactId>equalsverifier</artifactId>
  <version>2.0.2</version>
  <type>pom</type> <-------------- Remove this
</dependency>

Upvotes: 2

Related Questions