本文介绍了Maven,javadoc:没有包的源文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个具有目录结构的行家软件包

I'm writing a maven package with directory structure

frtex
   pom.xml
frtex/src/main/java/some-files.java
frtex/src/main/java/utils/some-other-files.java

制作mvn test效果很好.

我的问题是mvn javadoc:javadoc为frtex/src/main/java中包含但已发布的文件生成了正确的文档

My problem is mvn javadoc:javadoc that produces the right documentation for the files contained in frtex/src/main/java but issuing

[WARNING] javadoc: warning - No source files for package utils

这是我pom.xml的相关(?)部分:

Here is the relevant(?) part of my pom.xml :

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>2.10.4</version>
    <configuration>
        <groups>
            <group>
                <title>TI</title>
                <packages>frtex.*</packages>
            </group>
        </groups>

        <doclet>ch.raffael.doclets.pegdown.PegdownDoclet</doclet>
        <docletArtifact>
            <groupId>ch.raffael.pegdown-doclet</groupId>
            <artifactId>pegdown-doclet</artifactId>
            <version>1.1</version>
        </docletArtifact>
        <useStandardDocletOptions>true</useStandardDocletOptions>
    </configuration>
</plugin>

在project/build/plugins

我该怎么做才能使maven/javadoc在src/main/java/utils中找到文件?

What should I do to make maven/javadoc found the files in src/main/java/utils ?

推荐答案

这是一个较晚的响应,但我遇到了同样的问题.

This is a late response, but I just ran into the same issue.

解决方案是您需要在configuration部分

The solution is you need to add the following to your plugin inside the configuration section

<configuration>
   <sourcepath>src/main/java</sourcepath>
   ...
</configuration>

这篇关于Maven,javadoc:没有包的源文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 17:59