JvmSd121
JvmSd121

Reputation: 381

Maven dependency plugin downloads POM instead of tar.gz

I have two modules:

  module 1: builds as .tar.gz with assembly plugin (type declared as 'pom' in its pom.xml)

  module 2: needs to depend on the .tar.gz from the module above but always pulls the pom from the nexus instead.

Is there any trick? I see my .tar.gz on my Nexus correctly, it's just module 2 never goes for it, always just downloading the POM.

Upvotes: 0

Views: 421

Answers (1)

JvmSd121
JvmSd121

Reputation: 381

I finally found the issue. If I look in the metadata of the nexus (maven-metadata.xml)

I see my .tar.gz with a classifier tag from the maven assembly plugin id (the one from the external assembly xml).

I had this in the dependency plugin config, but not lower in the actual dependency section of my pom. Once I also added the classifier tag here, it all works as expected.

Upvotes: 1

Related Questions