首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从Maven依赖项继承Javadoc

问从Maven依赖项继承Javadoc
EN

Stack Overflow用户
提问于 2016-07-01 01:54:29
回答 1查看 372关注 0票数 3

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

我的问题是,打开<includeDependencySources>意味着,指定的依赖项的源是作为我的模块的Javadoc的一部分生成的,这并不是我们所希望的。有没有一种方法可以在不为依赖源生成Javadoc的情况下从依赖源继承文档?

代码语言:javascript
复制
<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>
EN

回答 1

Stack Overflow用户

发布于 2016-07-01 11:11:04

我还没有在Maven站点插件的页面上找到任何线索来证明这是可能的。

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

您可以按照以下步骤集成您的静态页面:

资源将您的静态页面放在

  • 目录${basedir}/src/site/resources

中

创建site.xml并将其放入

  • 通过修改菜单部分、创建项目并将其映射到静态页面的文件名来链接到静态页面
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38130167

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档