apache / apache/maven-javadoc-plugin

[MJAVADOC-797] Exclusion rules works differently for Java 8 and Java 11

Open
#1,171 3 comments 0 reactions 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
107
Forks
116
Avg merge
1d 10h
Merged PRs (30d)
16

Description

**[Maksim Timonin](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=timonin.maksim)** opened **[MJAVADOC-797](https://issues.apache.org/jira/browse/MJAVADOC-797?redirect=false)** and commented

The behavior of the "-excludePackageNames" differs for java8 and java11 in case of using an option "-subpackages".

Reproducer is available in the PR:

 [1] https://github.com/apache/maven-javadoc-plugin/pull/289

There are possibly, 2 bugs:

1. Behavior for "excludePackageNames" is actually depends on whether the "subpackages" setting is specified or not - there are different patterns for exclusion used, see patterns in **JavadocUtil#getExcludedPackages** and **JavadocUtil#getIncludedFiles**

2. In case of using "subpackages" the scenario in the PR [1], the plugin prepares equal options for the javadoc util for both java versions. But actually the output for the javadoc util differs (depends on the java version). I'm not sure is it an expected behavior for the javadoc util, but I'd expect the maven-javadoc-plugin will adjust for different java versions and provides equal exclusion result.

 

---

**Affects:** 3.7.0

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with PR #289 and compare the behavior described for Java 8 and Java 11. Read JavadocUtil#getExcludedPackages and JavadocUtil#getIncludedFiles, then trace how -subpackages and -excludePackageNames are translated for each Java version. Done means exclusion produces the same expected result in both versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.