使用Enunci生成java客户端库

使用Enunci生成java客户端库

问题描述:

我有几个RESTful web服务我想使用Enunciate 1.25使用Maven进行文档化。如果我没有自定义的enunciate.xml构建,所有客户端库都按预期构建。使用Enunci生成java客户端库

... 
<build> 
     <plugins> 
      <plugin> 
       <groupId>org.codehaus.enunciate</groupId> 
       <artifactId>maven-enunciate-plugin</artifactId> 
       <version>${maven-enunciate-plugin.version}</version> 
       <!-- configuration> 
        <configFile>src/main/resources/enunciate.xml</configFile> 
       </configuration --> 
       <executions> 
        <execution> 
         <goals> 
          <goal>assemble</goal> 
         </goals> 
        </execution> 
       </executions> 
      </plugin> 
     </plugins> 
    </build> 
... 

只要我加我加我的自定义enunciate.xml,没有生成的Java客户端库

<?xml version="1.0"?> 
<enunciate label="service/myservice" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.25.xsd"> 

    <modules> 
     <docs splashPackage="myservice.service" 
      includeDefaultDownloads="false" disableRestMountpoint="true" 
      applyWsdlFilter="false" docsDir="api" title="My Service API" 
      copyright="ME Inc" /> 
     <basic-app disabled="false" /> 
     <java-client disabled="false" /> 
     <xml disabled="false" /> 
     <jaxws-client disabled="false" /> 
     <jboss disabled="false" /> 
     <jaxws-ri disabled="true" /> 
     <jaxws-support disabled="true" /> 
     <csharp disabled="true" /> 
     <jersey disabled="true" /> 
     <c disabled="true" /> 
     <obj-c disabled="true" /> 
    </modules> 

    <webapp disabled="false" mergeWebXML="../webapp/WEB-INF/web.xml" /> 

    <namespaces> 
     <namespace uri="http://schema.me/services/myservice" id="myservice" /> 
    </namespaces> 

    <services> 
     <rest defaultRestSubcontext="/" /> 
    </services> 

    <api-classes> 
     <include pattern="myservice.service.*" /> 
    </api-classes> 

</enunciate> 

什么可能我做了错误或丢失?

+2

你摆脱输出的调试日志记录的任何信息(例如,“MVN -X”)。您可能会看到类似“java-client模块被禁用,因为...” – 2012-03-05 15:54:02

includeDefaultDownloads =“假”应该是真实的