首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >阐明使用ant生成REST API文档

阐明使用ant生成REST API文档
EN

Stack Overflow用户
提问于 2012-10-09 05:39:22
回答 2查看 1.3K关注 0票数 2

我正在尝试集成Enunicate来生成我们现有API的REST文档。

我得到一个警告:“警告:未知的工件'docs‘。工件将不会被导出。”当执行ant任务时。

我的设置中是否缺少了什么?

enunicate.xml为:

代码语言:javascript
复制
<?xml version="1.0"?>
<enunciate label="Empath REST api" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.23.xsd">
<modules>
    <!-- Docs -->
    <docs splashPackage="com.parc.perceptum.common" title="Empath REST API"
        copyright="PARC">        <download name="License" file="LICENSE.txt" description="The license file governing the use of this API." />
    </docs> 
</modules>
</enunciate>

相关的蚂蚁片段是:

代码语言:javascript
复制
<path id="enunciate.classpath"> 
    <fileset refid="project.libs"/> 
    <fileset dir="${java.home}"> 
            <include name="lib/tools.jar"/> 
    </fileset> 
    <pathelement path="${servlet-lib}" />
    <pathelement path="${mysql-lib}" />
</path>

<taskdef name="enunciate" classname="org.codehaus.enunciate.main.EnunciateTask"> 
    <classpath refid="enunciate.classpath"/>
</taskdef>

<target name="new-rest-api-doc">
    <enunciate basedir="src/com/parc/perceptum/">
      <include name="**/*.java"/>
      <classpath refid="enunciate.classpath"/>
      <export artifactId="docs" destination="restapi"/>
    </enunciate>
</target>

谢谢

场馆

EN

回答 2

Stack Overflow用户

发布于 2012-10-18 23:38:21

看起来您的类路径上可能没有明确的库。因此,Enunciate不会选择它的任何模块(包括提供“docs”工件的docs模块)。

票数 0
EN

Stack Overflow用户

发布于 2014-05-06 23:20:28

artifactId的值应为“war.file”

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12789863

复制
相关文章

相似问题

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