我正在尝试集成Enunicate来生成我们现有API的REST文档。
我得到一个警告:“警告:未知的工件'docs‘。工件将不会被导出。”当执行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>相关的蚂蚁片段是:
<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>谢谢
场馆
发布于 2012-10-18 23:38:21
看起来您的类路径上可能没有明确的库。因此,Enunciate不会选择它的任何模块(包括提供“docs”工件的docs模块)。
发布于 2014-05-06 23:20:28
artifactId的值应为“war.file”
https://stackoverflow.com/questions/12789863
复制相似问题