[ 
https://jira.codehaus.org/browse/MJAVADOC-356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=311232#comment-311232
 ] 

Gert Vanderseypen commented on MJAVADOC-356:
--------------------------------------------

I debugged in the javadocplugin (version 2.9) and it seems that there is 
probably something missing in the method AbstractJavadocMojo.getSourcePaths().

When getSourcePaths() is called in AbstractJavadocMojo, line 1855

it seems the following is returned: 
[C:\UserTemp\myfolder\indigo\eclipse\workspace-javadoc-test\Service\src\main\java,
 
C:\UserTemp\myfolder\indigo\eclipse\workspace-javadoc-test\Service\src\main\javadoc,
 
C:\UserTemp\myfolder\indigo\eclipse\workspace-javadoc-test\Service\target\distro-javadoc-sources\dep2-0.0.1-SNAPSHOT-sources]
>>> this clearly includes BOTH the javadoc and resources from the main project, 
>>> but it misses the resources from the dependent project dep2

so the method should have returned
[C:\UserTemp\myfolder\indigo\eclipse\workspace-javadoc-test\Service\src\main\java,
 
C:\UserTemp\myfolder\indigo\eclipse\workspace-javadoc-test\Service\src\main\javadoc,
 
C:\UserTemp\myfolder\indigo\eclipse\workspace-javadoc-test\Service\target\distro-javadoc-sources\dep2-0.0.1-SNAPSHOT-sources,
 
C:\UserTemp\myfolder\indigo\eclipse\workspace-javadoc-test\Service\target\distro-javadoc-sources\dep2-0.0.1-SNAPSHOT-javadoc-resources]

It is clear that the intention of the getSourcePath() is to return both the 
paths of the sources and the javadoc resources, both of the main project and 
the dependent projects!
But the problem is that getSourcePath() doesn't make a call to 
resolveDependencyBundles(), so it can not see yet the unpacked 
javadoc-resources because they are not yet there. 

Therefore I suggest the following fix: 
In resolveDependencyBundles() at the end of the method, now also make a call to 
resolveDependencyJavadocBundles(SourceResolverConfig)

Probably this should do the job right then....
                
> aggegating javadoc-resources of depending projects does not work
> ----------------------------------------------------------------
>
>                 Key: MJAVADOC-356
>                 URL: https://jira.codehaus.org/browse/MJAVADOC-356
>             Project: Maven 2.x Javadoc Plugin
>          Issue Type: Bug
>    Affects Versions: 2.9
>            Reporter: Gert Vanderseypen
>         Attachments: workspace-javadoc-test.rar
>
>
> The maven-javadoc-plugin documentation describes how to include 
> javadoc-resources of dependent projects.
> http://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate-dependency-sources.html
> Preliminary step: make the "dependent project" generate (install) javadoc.jar 
> + javadoc-resources.jar
> Afterwards it's said that maven should automatically take the dependent 
> javadoc-resources during the aggragation process, just like for the javadoc 
> itself. 
> This is exactly what we need. It seems to work fine for the javadoc itself, 
> but not for the resources.
> My test project can be found in attachment. 
> I use maven 2.2.1 (I tried it also with maven 3.0.4)
> first I install my project dep1: 
> mvn clean install site 
> >>> i look in the maven repo, and it seems my dep1 javadoc-resources.jar are 
> >>> installed, but it contains nothing, because i have no resources in this 
> >>> project of course.
> thereafter I install my project dep2: 
> mvn clean install site 
> >>> (i look in the maven repo, and it seems my dep2 javadoc-resources.jar are 
> >>> installed, and its content contains the right resource image 
> thereafter I install my project Service, which is configured to only contain 
> the javadoc (and thus also the resources?) from dep2: 
> mvn clean install site
> however, it seems when I open the site/javadoc folder, it contains the 
> javadoc from dep2, but it does NOT contain the resources!
> I suppose this is not normal?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to