2012-10-08 32 views
2

我想集成Enunicate來生成我們現有API的REST文檔。闡述使用螞蟻的REST API文檔生成

我收到一條警告「警告:未知工件」文檔「,工件不會被導出。當螞蟻任務被執行時。

在我的設置中是否有缺少的東西?

的enunicate.xml是:

<?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> 

和有關螞蟻片段:

<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> 

感謝

VENU

回答

0

您似乎沒有字正腔圓庫在你的類路徑上。所以Enunciate不會選擇它的任何模塊(包括提供'文檔'工件的docs模塊)。

+0

感謝Ryan。我複製了完成構建的那些罐子。也許,我錯過了Doc模塊的jar。 – venu

0

artifactId的值應該是'war.file'