Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to Generate REST Docs with Enunciate for a Spring-Jersey Project?
    primarykey
    data
    text
    <p>I'm struggling with something that I thought is quite simple - to generate documentation for a set of already existing REST services, which are basically just POJOs annotates with <strong>JAX-RS</strong> annotations. I'm using <strong>Jersey</strong> as an implementation provider. The REST API is deployed as part of a <strong>Spring</strong> web application. </p> <p>I want to generate only the documentation for the REST services POJOs, so my <strong>enunciate.xml</strong> configuration is something like that:</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;enunciate label="novaglobalapi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.25.xsd"&gt; &lt;api-classes&gt; &lt;include pattern="com.something.api.rest.*"/&gt; &lt;/api-classes&gt; &lt;modules&gt; &lt;docs docsDir="restapi" title="REST API"/&gt; &lt;/modules&gt; &lt;/enunciate&gt; </code></pre> <p>I've configured my <strong>pom.xml</strong> as suggested in the <em>enunciate</em> documentation:</p> <pre><code>&lt;build&gt; ... &lt;plugin&gt; &lt;groupId&gt;org.codehaus.enunciate&lt;/groupId&gt; &lt;artifactId&gt;maven-enunciate-plugin&lt;/artifactId&gt; &lt;version&gt;1.25&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;goals&gt; &lt;goal&gt;docs&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;configuration&gt; &lt;configFile&gt;enunciate.xml&lt;/configFile&gt; &lt;/configuration&gt; &lt;/plugin&gt; ... &lt;/build&gt; </code></pre> <p>But when I run <code>mvn enunciate:docs</code>, I'm getting the following build error:</p> <pre><code>[ERROR] Failed to execute goal org.codehaus.enunciate:maven-enunciate-plugin:1.25:docs (default-cli) on project NovaGlobalSSOAPI: Problem assembling the enunciate app. invalid LOC header (bad signature) -&gt; [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.enunciate:maven-enunciate-plugin:1.25:docs (default-cli) on project NovaGlobalSSOAPI: Problem assembling the enunciate app. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: Problem assembling the enunciate app. at org.codehaus.enunciate.DocsMojo.execute(DocsMojo.java:99) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: java.util.zip.ZipException: invalid LOC header (bad signature) at java.util.zip.ZipFile.read(Native Method) at java.util.zip.ZipFile.access$1200(ZipFile.java:31) at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:459) at java.util.zip.ZipFile$1.fill(ZipFile.java:242) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141) at java.io.DataInputStream.readFully(DataInputStream.java:178) at java.util.jar.JarFile.getBytes(JarFile.java:362) at java.util.jar.JarFile.getManifestFromReference(JarFile.java:161) at java.util.jar.JarFile.getManifest(JarFile.java:148) at org.codehaus.enunciate.main.Enunciate.scanClasspath(Enunciate.java:409) at org.codehaus.enunciate.main.Enunciate.doGenerate(Enunciate.java:319) at org.codehaus.enunciate.ConfigMojo$MavenSpecificEnunciate.doGenerate(ConfigMojo.java:634) at org.codehaus.enunciate.main.Enunciate$Stepper.step(Enunciate.java:1706) at org.codehaus.enunciate.main.Enunciate$Stepper.stepTo(Enunciate.java:1738) at org.codehaus.enunciate.DocsMojo.execute(DocsMojo.java:95) ... 21 more </code></pre> <p>I can not figure out, what am I doing wrong. Any ideas?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload