Maven 阐明用于JAX-RS的CXF插件

Maven 阐明用于JAX-RS的CXF插件,maven,maven-plugin,cxf,jax-rs,enunciate,Maven,Maven Plugin,Cxf,Jax Rs,Enunciate,我正试图通过配置如下的Maven插件,使用Enouncate插件for CXF为我的REST接口生成文档: <plugin> <groupId>org.codehaus.enunciate</groupId> <artifactId>maven-enunciate-cxf-plugin</artifactId> <!-- check for the latest version --> <version

我正试图通过配置如下的Maven插件,使用Enouncate插件for CXF为我的REST接口生成文档:

<plugin>
  <groupId>org.codehaus.enunciate</groupId>
  <artifactId>maven-enunciate-cxf-plugin</artifactId>
  <!-- check for the latest version -->
  <version>1.21</version>
  <executions>
    <execution>
      <goals>
        <goal>docs</goal>
      </goals>
      <configuration>

        <!-- the directory where to put the docs -->
        <docsDir>${project.build}/docs </docsDir>

      </configuration>
    </execution>
  </executions>
</plugin>
错误是:

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] 'docs' was specified in an execution, but not found in the plugin
[INFO] ------------------------------------------------------------------------
有什么建议吗

提前感谢,

马克

更新: 我将插件更改为:

  <plugin>
    <groupId>org.codehaus.enunciate</groupId>
    <artifactId>maven-enunciate-plugin</artifactId>
    <version>1.21</version>
    <executions>
      <execution>
        <goals>
          <goal>docs</goal>
        </goals>
        <configuration>
          <docsDir>${project.build}/docs </docsDir>
        </configuration>
      </execution>
    </executions>
    <dependencies>
      <dependency>
        <groupId>org.codehaus.enunciate</groupId>
        <artifactId>enunciate-rest</artifactId>
        <version>1.21</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.enunciate</groupId>
        <artifactId>enunciate-cxf-rt</artifactId>
        <version>1.21</version>
      </dependency>
    </dependencies>
  </plugin>

org.codehaus.expunciate
maven发音插件
1.21
文件
${project.build}/docs
org.codehaus.expunciate
吐字休息
1.21
org.codehaus.expunciate
阐明cxf-rt
1.21
它可以工作,但是我的JSON对象返回的类型和参数没有被记录下来。

试试这个:

<artifactId>maven-enunciate-plugin</artifactId>
,可能需要添加一些插件依赖项


在我的Maven项目和CXF中,我使用上面的
artifactId
,使用Enounciate生成文档,没有任何问题

谢谢。事实上,我昨晚很晚才用你提到的类似方法解决了这个问题。我只是没有时间发布更新。re:关于JSON对象的更新。Enounceate似乎不能很好地处理JSON对象。然而,我能够让它记录我的JSON返回类型。有关详细信息,请参阅邮件列表上的此线程:
<artifactId>maven-enunciate-plugin</artifactId>