配置帮助文件

如果指定了自定义<helpfile/>参数,您将能够使用它:

  • 如果<helpfile/>是给定文件,则可以使用绝对路径或相对路径,例如:
    <project>
      ...
      <reporting> (or <build>)
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.3.2</version>
            <configuration>
              <helpfile>${basedir}/path/to/your/helpfile</helpfile>
              ...
            </configuration>
          </plugin>
        </plugins>
        ...
      </reporting> (or </build>)
      ...
    </project>
    
  • 从 2.6 开始,<helpfile/>可以是项目目录中的资源,即src/main/javasrc/main/resourcessrc/main/javadoc,例如:
    <project>
      ...
      <reporting> (or <build>)
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.3.2</version>
            <configuration>
              <helpfile>path/to/your/resource/help-doc.html</helpfile>
              ...
            </configuration>
          </plugin>
        </plugins>
        ...
      </reporting> (or </build>)
      ...
    </project>
    
  • 从 2.6 开始,<helpfile/>可以是 Javadoc 插件依赖项中的资源,例如:
    <project>
      ...
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.3.2</version>
            <configuration>
              <helpfile>path/to/your/resource/help-doc.html</helpfile>
            </configuration>
            <dependencies>
              <dependency>
                <groupId>groupId</groupId>
                <artifactId>artifactId</artifactId>
                <version>version</version>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
        ...
      </build>
      ...
    </project>