I have configured my REST/Spring/Jersey project to generate documentation for APIs using enunciate.
The relevant changes in my pom.xml are
<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>
My enunciate.xml is as follows
<?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>
When I run my maven project I get the following error initializing enunciate. As you can see the error is not very helpful. Any hints what could be wrong in my configuration.
--- maven-enunciate-spring-plugin:1.28:assemble (default) @ xxx --- initializing enunciate. [csharp] C# compilation is disabled, but the source code will still be generated.
invoking enunciate:generate step...
BUILD FAILURE
Total time: 3.324s
Failed to execute goal org.codehaus.enunciate:maven-enunciate-spring-plugin:1.28:assemble (default) on project xxx: Problem assembling the enunciate app. String index out of range: 0 -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException