Maven Javadoc +自定义doclet [英] Maven javadoc + custom doclet

查看:430
本文介绍了Maven Javadoc +自定义doclet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从命令行调用mvn时,如何指定doc制品?

How can i specify the doclect artifact when calling mvn from command line

mvn clean install javadoc:javadoc -Ddoclet=my.Doclet -DdocletArtifact=????

推荐答案

您应在pom.xml中添加类似内容:

You should add something like this to your pom.xml:

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <configuration>
      <doclet>my.doclet</doclet>
      <docletArtifact>
        <groupId>my.artifact.group</groupId>
        <artifactId>my.artifact.id</artifactId>
        <version>my.artifact.version</version>
      </docletArtifact>
    </configuration>
  </plugin>

使用备用 Apache Maven Javadoc插件文档中的Doclet.

This is also documented in detail in section Using Alternate Doclet of the Apache Maven Javadoc Plugin documentation.

您不能简单地从命令行指定这些参数,而只能使用构建配置文件可以帮助您选择所需的配置.

You cannot simply specify these parameters from the command line, but using a Build Profile may help you selecting the configuration you want to have.

这篇关于Maven Javadoc +自定义doclet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆