[ https://issues.apache.org/jira/browse/MJAVADOC-450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Scholte closed MJAVADOC-450. ----------------------------------- Fix Version/s: 3.3.1 Assignee: Robert Scholte Resolution: Fixed Fixed in [7b7813e5ee6ba59ba75701c4d689337865bdc1f1|https://gitbox.apache.org/repos/asf?p=maven-javadoc-plugin.git;a=commit;h=7b7813e5ee6ba59ba75701c4d689337865bdc1f1] > Artifacts with a classifier are ignored when looking for resources in > dependencies > ---------------------------------------------------------------------------------- > > Key: MJAVADOC-450 > URL: https://issues.apache.org/jira/browse/MJAVADOC-450 > Project: Maven Javadoc Plugin > Issue Type: Bug > Affects Versions: 2.10.3 > Environment: Apache Maven 3.3.9 > (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00) > Java version: 1.8.0_66, vendor: Oracle Corporation > OS name: "mac os x", version: "10.11.4", arch: "x86_64", family: "mac" > Reporter: Sebastian Marsching > Assignee: Robert Scholte > Priority: Major > Labels: patch > Fix For: 3.3.1 > > Attachments: MJAVADOC-450.patch > > > 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. -- This message was sent by Atlassian Jira (v8.3.4#803005)