2

Enunicate を統合して、既存の API の REST ドキュメントを生成しようとしています。

「警告: アーティファクト 'ドキュメント' が不明です。アーティファクトはエクスポートされません。」という警告が表示されます。Ant タスクの実行時。

セットアップに欠けているものはありますか?

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>

関連する ant フラグメントは次のとおりです。

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

ありがとう

金星

4

2 に答える 2

0

artifactId の値は「war.file」である必要があります

于 2014-05-06T15:20:27.580 に答える
0

クラスパスに enunciate ライブラリがないようです。そのため、Enunciate はそのモジュール (「docs」アーティファクトを提供する docs モジュールを含む) を選択しません。

于 2012-10-18T15:38:21.217 に答える