apache / apache/maven-javadoc-plugin
[MJAVADOC-492] Need a way to aggregate subproject javadocs without regenerating them
- Dominant language
- Java
- Stars
- 107
- Forks
- 116
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 16
Description
**[David M. Karr](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=dkarr)** opened **[MJAVADOC-492](https://issues.apache.org/jira/browse/MJAVADOC-492?redirect=false)** and commented
I work on a largish multiproject build. I implemented a custom javadoc taglet that will be used in each project (although only in one so far). This taglet needs to access the class file associated with the source file the tag is contained within. I've gotten this to work in each project by overriding the "tagletArtifacts" list in each subproject (with combine.children="append"), adding the GAV for the artifact produced by that POM. The main configuration for maven-javadoc-plugin is defined in the parent pom that all the subprojects have as their parent pom.
However, the javadoc output in each subproject is really just a validation step, because the deliverable I need is the aggregation of the javadoc of all of the subprojects, which I generate from the root project with "javadoc:aggregate-jar". This doesn't aggregate the already created output from each subproject, it really just regenerates it all again. Unfortunately, this does not use the overridden "tagletArtifacts" list in each subproject, so when the taglet runs, it can't find the class file and fails to generate its output.
The only "fix" I can see for this at this time is to go into the parent pom, editing the configuration for the execution element for "aggregate-jar", adding a tagletArtifacts list that incliudes the GAVs for all of the subprojects, the exact kind of thing I was trying to avoid doing by using the 'combine.children="append"' approach in each subproject.
I've looked at the documentation for the maven-javadoc-plugin, and I don't see any other way around this. What I really need is a way to somehow "merge" the already generated javadoc output for each subproject, or somehow allow the "aggregate-jar" goal in the root project get information out of each subproject for the tagletArtifacts list.
---
**Affects:** 2.10.4
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the aggregate-jar goal and comparing the parent POM's configuration with the subproject POMs described in the issue, focusing on tagletArtifacts and combine.children="append". Done means the root aggregation can use the subprojects' existing Javadoc output or configuration without regenerating it or duplicating every subproject GAV.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100