apache / apache/maven-javadoc-plugin

`excludePackageNames` with latest `maven-javadoc-plugin` not working correctly

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

Description

### Affected version

3.12.0

### Bug description

It used to (and still in the documentation) accept wildcards with "subpackages":

`org.example.*`

When running with my local GraalVM 21 installation, this works.
Running with my local GraalVM 25 installation, it does not exclude anything (not even `org.example`!)
Same issues occur with Oracle JDK 25.

Combined with:
- `all,-missing`
- `true`
...this is causing a build of mine to fail.

Yes, I will migrate to directly specify each package, as I do also believe subpackages may not be a good convention.
I am unsure if this issue belongs to this Maven plugin.

A quick check shows:
> `-exclude` _pkglist_
> Unconditionally, excludes the specified packages and their subpackages...
> [Java 25 documentation for `javadoc` tool](https://docs.oracle.com/en/java/javase/25/docs/specs/man/javadoc.html#options-for-javadoc)
...so perhaps it does not belong here.

However, a quick skim read - it does not appear this documentation mentions wildcards.
The `plugin.xml` of `maven-javadoc-plugin` does:
> Wildcards work as followed:
> * a wildcard at the beginning should match one or more directories
> * any other wildcard must match exactly one directory
>
> Example: <excludePackageNames>*.internal:org.acme.exclude1.*:org.acme.exclude2</excludePackageNames>
(and I was previously using these wildcards in a project).

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the documented org.example.* behavior with GraalVM 21, GraalVM 25, and Oracle JDK 25, using the plugin.xml wildcard description and the Java 25 javadoc -exclude documentation as references. Compare the results with explicit package names and determine whether the plugin behavior or its documentation needs correction; done means the affected behavior and expected configuration are clearly established.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.