2

I am trying to integrate Enunicate to generate REST documentation of our existing API's.

I get a warning "WARNING: Unknown artifact 'docs'. Artifact will not be exported." when the ant task is executed.

Is there something that is missing in my setup?

The enunicate.xml is :

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

And the relevant ant fragment is :

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

Thanks

Venu

tenorsax
  • 21,123
  • 9
  • 60
  • 107
venu
  • 21
  • 2

2 Answers2

0

Looks like you might not have the enunciate libraries on your classpath. So Enunciate doesn't pick up any of its modules (including the docs module, which provides the 'docs' artifact).

Ryan Heaton
  • 1,173
  • 7
  • 11
  • Thanks Ryan. I copied those jars that completed the build. Perhaps, I missed out on the Doc module jar. – venu Oct 18 '12 at 16:44
0

The value of artifactId should be 'war.file'

Sara
  • 1