Uploaded image for project: 'repository.jboss.org/nexus'
  1. repository.jboss.org/nexus
  2. NEXUS-960

Clarify whether maven artifacts containing a classifier require source/javadoc jars

XMLWordPrintable

    • MWES 2025-07-14

      According to https://central.sonatype.org/publish/requirements/#supply-javadoc-and-sources :

      For every <artifactId>-<version>.jar file, you must provide a corresponding <artifactId>-<version>-sources.jar and a <artifactId>-<version>-javadoc.jar.

      However, the validation logic in https://github.com/jbossorg/nx3-maven-central-deploy requires sources/javadoc jars for every jar, including those with a classifier that do not conform to the pattern above.

      Many projects publish artifacts that contain a classifier. For example, the default configuration of the test-jar goal of the maven-jar-plugin generates artifacts with a "tests" classifier.
      e.g.
      wildfly-clustering-session-spi-X.Y.Z.Final-tests.jar

      It is certainly trivial to add test-jar goals to the maven-javadoc-plugin and maven-source-plugin, however, the jar file names generated by the default configuration of these plugins are inconsistent with classifier used by the default configuration of the test-jar goal of the maven-jar-plugin.
      e.g.
      rw-rr- 1 paul paul 17888 Jul 25 11:33 wildfly-clustering-session-spi-7.0.9.Final-SNAPSHOT.jar
      rw-rr- 1 paul paul 186983 Jul 25 11:33 wildfly-clustering-session-spi-7.0.9.Final-SNAPSHOT-javadoc.jar
      rw-rr- 1 paul paul 13501 Jul 25 11:33 wildfly-clustering-session-spi-7.0.9.Final-SNAPSHOT-sources.jar
      rw-rr- 1 paul paul 135728 Jul 25 11:33 wildfly-clustering-session-spi-7.0.9.Final-SNAPSHOT-test-javadoc.jar
      rw-rr- 1 paul paul 14160 Jul 25 11:33 wildfly-clustering-session-spi-7.0.9.Final-SNAPSHOT-tests.jar
      rw-rr- 1 paul paul 8090 Jul 25 11:33 wildfly-clustering-session-spi-7.0.9.Final-SNAPSHOT-test-sources.jar

      Can you clarify whether source/javadoc jars are required for artifacts with classifiers?
      If not, the validation logic of the nx3-maven-central-deploy plugin needs to be updated to exclude artifacts with classifiers.

              dhladky@redhat.com David Hladky
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: