Skip to content

excludePackageNames with latest maven-javadoc-plugin not working correctly #1271

@mechite

Description

@mechite

Affected version

3.12.0

Bug description

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

<excludePackageNames>org.example.*</excludePackageNames>

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:

  • <doclint>all,-missing</doclint>
  • <failOnError>true</failOnError>
    ...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
...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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions