Why does search not find artifacts within the same GAV but with different extensions?

Symptom

You may notice that some artifacts using the same groupId/artifactId/version are not showing in Nexus search results or the Browse Index UI next to their peer artifacts at the same Maven 2 repository path.

An example is if you search for the following artifact using a Nexus ‘GAV’ search against the Maven central index:

groupId: log4j
artifactId: log4j
version: 1.2.17

Explanation

This GAV contains two artifacts with different extensions, but the second artifact (.zip) does not use a classifier. Therefore, sometimes you will notice that the search results only list the .jar artifact, or the .zip artifact, but not all of the artifacts.

Maven best practices dictate that there should only be one main artifact associated with a pom file and that additional artifacts should be distinguished by classifier.

The Maven Indexer was originally coded with this in mind, and consequentially if there is more than one main artifact (distinguished only by packaging) only one will show up in the index tree.

At some point we will likely replace the Maven Indexer with a new technology. If/when this is done this limitation will not be present.

Related Maven Indexer Issues

Have more questions? Submit a request

3 Comments

  • 0
    Avatar
    Angel Ruiz
    Well that's a bummer :-( We are developing Atlassian Plugins where a .jar and a .obr are generate but only the later is shown in the search results, but we use both artifacts. In fact we use the jar file more
  • 0
    Avatar
    Peter Lynch

    We are closing this article for comments.

    If you have a support license, please contact us by submitting a support ticket.

    If you do not have a support license, please use our Nexus Users List or our other free support resources.

  • 0
    Avatar
    Peter Lynch
    Angel Ruiz: Can you generate one of these artifacts in its own module with another artifact id?
Article is closed for comments.
Powered by Zendesk