Uploaded image for project: 'Maven Javadoc Plugin'
  1. Maven Javadoc Plugin
  2. MJAVADOC-640

Ability to exclude maven modules from javadoc aggregate goals

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 3.1.1
    • 3.2.0
    • None
    • None
    • Java 11

    Description

      This is a request to add a configuration option to provide a list of maven modules to exclude from javadoc aggregate goals. For example:

      <excludeSubModules>internal,test,util</excludeSubModules>
      

      When a javadoc aggregate goal is run the modules listed are skipped/ignored.

      Motivation

      We have a fairly complicated multi-module Maven project. We generate Java 11 javadoc - therefore Java modules enter the picture. The artifacts we deploy are all named Java modules - so far, so good. But we also have Maven modules that we don't deploy.  And we  don't want aggregated javadoc for them. And they really aren't Java modules. We want them to be ignored by the aggregate Javadoc goal. But they are part of our default reactor because we need those modules to build/test our project. It's not practical to shape the reactor just for the sake of the aggregated javadoc.

      The aggregate goal also requires that all modules in the reactor be named:

      getLog().error( "Creating an aggregated report for both named and unnamed modules is not possible." );
      

      One work-around for this is to add an Automatic-Module-Name to the unnamed modules. Unfortunately that only works if the javadoc goal is run as part of a build life cycle (so that there are attached artifacts with the manifest). During development, nobody wants to build the full project just to generate aggregated javadoc.

      So that means we have to add a module-info file for all of our Maven modules, even if they really are not Java modules. Even if we don't want the aggregated javadoc to include them. For our project this has turned into a significant hassle.

      If we had an option to tell the aggregate goal to skip some submodules then this problem goes away, and it becomes much easier for us to build and maintain the aggregated javadoc.

       

       

      Attachments

        Issue Links

          Activity

            People

              olamy Olivier Lamy
              barchetta Joe DiPol
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: