gpt4 book ai didi

maven - Maven 依赖的 Javadoc 继承

转载 作者:行者123 更新时间:2023-12-02 04:40:18 25 4
gpt4 key购买 nike

我需要从一个存在于 Maven 依赖项中的接口(interface)继承 Javadoc。为了继承文档,我在我的模块中添加了对 javadoc 插件的覆盖。我把它放在<reporting>我的 POM 部分,因为我想生成 Javadoc 作为 mvn site 的一部分目标。

我的问题是转动 <includeDependencySources> on 意味着,指定的依赖项的源代码是作为我的模块的 Javadoc 的一部分生成的,这是不需要的。有没有办法在不为依赖源生成 Javadoc 的情况下从依赖源继承文档?

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration combine.self="append">
<source>${jdkVersion}</source>
<includeDependencySources>true</includeDependencySources>
<includeTransitiveDependencySources>false</includeTransitiveDependencySources>
<dependencySourceIncludes>
<dependencySourceInclude>com.mysource.object:*</dependencySourceInclude>
<dependencySourceInclude>com.mysource.object2:*</dependencySourceInclude>
<dependencySourceInclude>com.mysource.common:*</dependencySourceInclude>
</dependencySourceIncludes>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>javadoc</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>

最佳答案

我在 Maven 站点插件的页面上没有发现任何可能的线索。

但是,请参阅 Apache Maven Site Plugin / FAQ, How do I Integrate static (X)HTML pages into my Maven site? :

You can integrate your static pages by following these steps:

  • Put your static pages in the resources directory, ${basedir}/src/site/resources

  • Create your site.xml and put it in ${basedir}/src/site

  • Link to the static pages by modifying the menu section, create items and map them to the filenames of the static pages

关于maven - Maven 依赖的 Javadoc 继承,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38130167/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com