apache / apache/maven-javadoc-plugin
[MJAVADOC-631] Exclusion of generated code creates reference not found error
- Dominant language
- Java
- Stars
- 107
- Forks
- 116
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 16
Description
**[Antoine Tran](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=antoine.tran)** opened **[MJAVADOC-631](https://issues.apache.org/jira/browse/MJAVADOC-631?redirect=false)** and commented
Using exclusion files, I excluded some generated code:
```java
${javadoc.excludes}
```
with a property for example:
```java
**/generated/**
```
But the thing is, we reference some generated code classes in javadoc, so of course we have these errors of not found reference:
```java
/var/lib/jenkins/jobs/[PathToJava].java:19: error: package ...mccommon.mcinterface.generated does not exist
```
```java
15:03:08 /var/lib/jenkins/jobs/[PathToJava].java:33: error: cannot find symbol
```
```java
15:03:08 implements HistoricalRequestParameter
15:03:08 symbol: class IFAMQPADMRequestHistoricData
```
So either we don't exclude referenced classes, but we have multiple error from a generated code (in this case Avro generated code), or we exclude them, but in that case, we cannot reference them in the eye of maven-javadoc-plugin.
There should be a way to either:
* exclude some code and ignore reference to these classes
* or mark some generated code as special, so that we generated javadoc for them too, but we silently ignore any warnings/errors related to them
---
**Affects:** 3.1.1
1 votes, 2 watchers
Contributor guide
No contributing guide indexed for this repository
Research direction
No source file, test, or entry point is named. Reproduce the Maven Javadoc build using sourceFileExcludes and generated classes, then inspect how excluded sources and unresolved references are handled. Done means one documented, tested behavior for excluded generated code without the reported reference errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100