Uploaded image for project: 'Maven Javadoc Plugin'
  1. Maven Javadoc Plugin
  2. MJAVADOC-450

Artifacts with a classifier are ignored when looking for resources in dependencies

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.10.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
    • Flags:


      When adding a an artifact with a classifier to the dependencies of the maven-javadoc-plugin, this artifact is not used when trying to resolve dependencies.
      The symptom is that a message like

      [WARNING] Unable to find the resource 'path/to/resource'. Using default Javadoc resources.

      is displayed, even though the resource "path/to/resource" is present in a JAR listed in the plugin dependencies.

      The reason for this seems to be that the code resolving the artifact does not consider the specified classifier: The class JavadocPathArtifact does not have a field for the classifier and consequently, the classifier is not set when building the JavadocPathArtifact in AbstractJavadocMojo.getResource (AbstractJavadocMojo.java:5307).

      The solution is adding a classifier field to JavadocPathArtifact and using this classifier in AbstractJavadocMojo.createAndResolveArtifact. However, I think there is also bug in that method because it uses createProjectArtifact when it should probably use createArtifactWithClassifier. createProjectArtifact always refers to the POM, so in the end the pom.xml is added to the classpath which never makes sense.




            • Assignee:
              smarsching Sebastian Marsching


              • Created:

                Issue deployment