How to merge method and description columns

56 views Asked by At

I'm new to javadoc. I've tried to generate javadoc with Maven plugin. It works well, however, it generates 2 columns Method and Description instead 1 column Method and Description. I can't find option to merge these 2 columns.

Here is the config in the pom file:

<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-javadoc-plugin</artifactId>
      <version>3.5.0</version>
      <configuration>
        <source>1.8</source>
        <target>1.8</target>
      </configuration>
    </plugin>
  </plugins>
</build>

And, here is the result:

The result

What I would expect:

My expect

1

There are 1 answers

1
Jelmen On

By default, the Maven Javadoc plugin generates Javadoc with two columns: Method and Description. However, if you want to merge these two columns into a single column, you can use the <noindex>true</noindex> configuration option.

<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-javadoc-plugin</artifactId>
      <version>3.5.0</version>
      <configuration>
        <source>1.8</source>
        <target>1.8</target>
        <additionalparam>-noindex</additionalparam>
      </configuration>
    </plugin>
  </plugins>
</build>

By adding the <additionalparam>-noindex</additionalparam> configuration, you are passing the -noindex option to the Javadoc tool, which will result in a single column layout for the Method and Description.

After making this change, you can regenerate the Javadoc by running the Maven command mvn javadoc:javadoc. The generated Javadoc should now have a single column for Method and Description.