英文:
How to merge method and description columns
问题
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 an 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:
What I would expect:
英文:
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:
What I would expect:
答案1
得分: 1
默认情况下,Maven Javadoc 插件生成的 Javadoc 具有两列:方法和描述。但是,如果您想将这两列合并为单独的一列,您可以使用<noindex>true</noindex>
配置选项。
通过添加<additionalparam>-noindex</additionalparam>
配置,您正在将-noindex选项传递给Javadoc工具,这将导致方法和描述的单列布局。
在进行此更改后,您可以通过运行Maven命令mvn javadoc:javadoc
重新生成Javadoc。生成的Javadoc现在应该具有方法和描述的单列。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论