Maven javadoc + custom doclet

一笑奈何 提交于 2019-12-14 02:35:54

问题


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

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

回答1:


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>

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.



来源:https://stackoverflow.com/questions/27189441/maven-javadoc-custom-doclet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!