初始化enunciate时出错 - 生成步骤错误

时间:2014-01-28 23:50:16

标签: maven enunciate

我已经配置了我的REST / Spring / Jersey项目,使用enunciate为API生成文档。

我的pom.xml中的相关更改是

 <plugin>
        <groupId>org.codehaus.enunciate</groupId>
        <artifactId>maven-enunciate-spring-plugin</artifactId>
         <version>1.28</version>
        <configuration>
            <generateDir>${project.build.directory}/enunciate-generate</generateDir>
          <configFile>enunciate.xml</configFile>
          <exports>
            <jaxws.client.library.binaries>client.jar</jaxws.client.library.binaries>
          </exports>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>assemble</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
.....
    <dependency>
      <groupId>org.codehaus.enunciate</groupId>
      <artifactId>maven-enunciate-spring-plugin</artifactId>
      <version>1.28</version>
    </dependency>

我的enunciate.xml如下

<?xml version="1.0"?>
<enunciate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd">
<api-classes>
<include pattern="com.xxx.rest.*"/>
</api-classes>
<modules>
<docs docsDir="api" title="REST WebServices API"/>
<spring-app>
<war mergeWebXML="war/WEB-INF/web.xml"/>
<springImport file="war/WEB-INF/applicationContext-jdbc.xml"/>
</spring-app>
</modules>
</enunciate>

当我运行我的maven项目时,我得到以下错误初始化enunciate。如您所见,错误不是很有帮助。任何暗示我的配置可能出错。

--- maven-enunciate-spring-plugin:1.28:汇编(默认)@ xxx --- 初始化发音。 [csharp] C#编译被禁用,但仍会生成源代码。

调用enunciate:generate step ...

建筑失败

总时间:3.324s

无法执行目标org.codehaus.enunciate:maven-enunciate-spring-plugin:1.28:汇编(默认)项目xxx:组装enunciate应用程序时出现问题。字符串索引超出范围:0 - &gt; [帮助1]

要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。 使用-X开关重新运行Maven以启用完整的调试日志记录。

有关错误和可能的解决方案的更多信息,请阅读以下文章: [帮助1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

1 个答案:

答案 0 :(得分:0)

报告了StringIndexOutOfBoundsException并修复了here

API调用失败&#34;几乎总是由一些编译失败引起的。也许当你搞乱你的依赖关系以解决第一个问题时,你在代码库中引入了编译失败?

相关问题