Issue Details (XML | Word | Printable)

Key: MJAVADOC-194
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vincent Siveton
Reporter: Lois Modesitt
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 2.x Javadoc Plugin

javadoc 2.4 does not [build-helper:add-source {execution: add-source}] when aggregating a javadoc for a project

Created: 30/May/08 05:42 PM   Updated: 02/Jan/09 05:18 AM   Resolved: 06/Jun/08 02:40 PM
Return to search
Component/s: None
Affects Version/s: 2.4
Fix Version/s: 2.5

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive JavaDocTestCase.zip (48 kB)
2. Text File m209out-UsingJavadoc2.3.txt (1.05 MB)
3. Text File m209out-UsingJavadoc2.4.txt (1.31 MB)
4. Text File m209out-UsingJavadoc2.5SNAPSHOT.txt (450 kB)

Environment:
Maven version: 2.0.9
Java version: 1.5.0_12
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
Issue Links:
Related
 


 Description  « Hide

The javadoc does not include the "additional source" files defined using the "build-helper:add-source" in each of my subproject pom files when using javadoc plugin 2.4. The javadoc plugin 2.3 worked correctly.

I use the "build-helper:add-source" to include additional source directories to the build. The additional source directories contain my generated source file. When I run the command using javadoc plugin version 2.4:
mvn javadoc:javadoc -Daggregate=true
(or have the aggregate=true specified inside of the pom) the "build-helper:add-source" is not run for each of the subprojects before the aggregated javadoc is created. Therefore the javadoc does not include the documentation for the files in the additional source directories.

I also noted that the output for 2.3 javadoc plugin is:
[INFO] task-segment: [javadoc:javadoc] (aggregator-style)
but the output for the 2.4 javadoc plugin is:
[INFO] task-segment: [javadoc:javadoc]

I am not sure if the above output is changed between versions or if the "aggregator-style" is not detectd in the 2.4 version and has an influence in this issue.

I have attached the log file for running my project using javadoc plugin version 2.3 and 2.4. Version 2.3 works and version 2.4 does not include the additional source files in the aggregated javadoc.



Benjamin Bentmann made changes - 30/May/08 05:50 PM
Field Original Value New Value
Link This issue duplicates MJAVADOC-168 [ MJAVADOC-168 ]
Benjamin Bentmann added a comment - 30/May/08 05:50 PM

This sound like a duplicate of MJAVADOC-168 which has just been fixed and a new snapshot deployed. Could you verify?


Lois Modesitt added a comment - 02/Jun/08 03:13 PM - edited

aggregated javadoc created BEFORE "build-helper:add-source" run on each module involved in the aggregated javadoc. Therefore the source files included with the "build-helper:add-source" is not included in the aggregated javadoc. Using the command:

mvn javadoc:javadoc -Daggregate=true

I used the 2.5-SNAPSHOT version of the maven-javadoc-plugin and this did not fix the problem.

The attached log files show the order of execution of the "javadoc" and the "build-helper:add-source" for each module included in the project is different between 2.3 (works) and 2.4/2.5-SNAPSHOT (does not work).


Lois Modesitt made changes - 02/Jun/08 03:13 PM
Vincent Siveton added a comment - 02/Jun/08 06:58 PM

Sorry, but I am not sure to understand correctly your usecase: could you send us a test case?


Lois Modesitt added a comment - 04/Jun/08 04:18 PM - edited

UseCase:
Create aggregated javadocs for both source code in the default location and
source code in an additional location. I include the "additional source code directory"
using the "build-helper-maven-plugin" which is included in the parent pom:
JavaDocTestCase/pom.xml.

Problem:
When I run the command:
mvn javadoc:javadoc -Daggregate=true
using javadoc version 2.4, the classes in the "additional" source code directory
is not included in the aggregated javadocs.
*******Using javadoc version 2.3, works correctly by including the additional
source code directory.**********

See the attached file JavaDocTestCase.zip.
Please read the file "Readme.txt" for more information about this test.
Let me know if you have any more questions.


Lois Modesitt made changes - 04/Jun/08 04:18 PM
Attachment JavaDocTestCase.zip [ 34971 ]
Vincent Siveton made changes - 05/Jun/08 07:22 AM
Link This issue duplicates MJAVADOC-168 [ MJAVADOC-168 ]
Vincent Siveton made changes - 05/Jun/08 07:23 AM
Link This issue is related to MJAVADOC-137 [ MJAVADOC-137 ]
Vincent Siveton added a comment - 05/Jun/08 07:23 AM

It is mainly due to the remove of @aggregator tag


Vincent Siveton made changes - 05/Jun/08 07:25 AM
Link This issue is related to MJAVADOC-196 [ MJAVADOC-196 ]
Vincent Siveton added a comment - 05/Jun/08 07:25 AM

Having a mojo with @aggregator should resolve this issue


Lois Modesitt added a comment - 05/Jun/08 03:35 PM

Will this change be done to the 2.5-SNAPSHOT? If it is, will someone let me know so that I can try out the 2.5-SNAPSHOT with this fix?


Vincent Siveton added a comment - 06/Jun/08 07:51 AM

I just fixed MJAVADOC-196 so you will be able to try the 2.5-snap


Lois Modesitt added a comment - 06/Jun/08 12:46 PM

I used the javadoc plugin 2.5-SNAPSHOT version: 20080606.132616-15 and the problem is still there. Is your change in this version of the SNAPSHOT?


Vincent Siveton added a comment - 06/Jun/08 01:04 PM

yes but you need to call javadoc:aggregate instead of javadoc:javadoc. See svn log file http://svn.apache.org/viewvc?rev=663917&view=rev
You could also generate the documentation from the trunk.


Lois Modesitt added a comment - 06/Jun/08 01:24 PM

Yes, that fix is great. I tried the test using javadoc:aggregate and the problem is resolved. Thanks


Lois Modesitt added a comment - 06/Jun/08 02:08 PM

Do you (Vincent) close this issue? Or am I supposed to do this?


Vincent Siveton added a comment - 06/Jun/08 02:40 PM

fixed due to MJAVADOC-196


Vincent Siveton made changes - 06/Jun/08 02:40 PM
Assignee Vincent Siveton [ siveton ]
Resolution Fixed [ 1 ]
Fix Version/s 2.5 [ 14120 ]
Status Open [ 1 ] Closed [ 6 ]
Benjamin Bentmann made changes - 02/Jan/09 05:18 AM
Link This issue is related to MJAVADOC-168 [ MJAVADOC-168 ]