• Post Reply Bookmark Topic Watch Topic
  • New Topic

Generate REST api documentation using enunciate through ant build tool.  RSS feed

aiswarya lenin
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[size=12]Hi All,

Now I am trying to generate Rest api documentation using enunciate through ant build tool, but it generate only empty document. Please help me, I am new to enunciate , I don't know,where i did the mistakes. I hope you people help me out.Thanks in advance.

This is my enunciate.xml.


<?xml version="1.0"?>
<enunciate label="sample" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<include pattern="com.sample.controller.*" />

<!-- Docs -->
<docs title="example" copyright="Example.com"/>
<webapp mergeWebXML="WebContent/WEB-INF/web.xml" />
<spring-app disabled="false" springVersion="4.0.5">
<springImport file="resources/dev/applicationContext.xml" />
<springImport file="WebContent/WEB-INF/rest-servlet.xml" />

<c disabled="true" />
<csharp disabled="true" />
<java-client disabled="false" />
<cxf disabled="false" />
<gwt disabled="false" />
<jaxws-client disabled="true" />
<jaxws-ri disabled="true" />
<jaxws-support disabled="true" />
<jersey disabled="true" />
<xml disabled="false" />
<obj-c disabled="true" />
<rest disabled="false" />


properties file for build.xml



This is my build.xml


<?xml version="1.0" encoding="UTF-8"?>
<project default = "enunciate">
<property file ="enunciate_build.properties"/>
<property name="lib.dir" value="../libs" />
<property name="src.dir" value="src"/>
<target name = "enunciate">
<path id= "enunciate.classpath">
<fileset dir = "${lib.dir}">
<include name="*.jar"/>
<fileset dir ="${lib.dir}/modules/spring">
<include name="*.jar"/>
<fileset dir = "${JAVA_HOME}">
<include name = "lib/tools.jar"/>
<taskdef name="enunciate" classname = "org.codehaus.enunciate.main.EnunciateTask">
<classpath refid = "enunciate.classpath"/>
<enunciate javacSourceVersion="1.7" javacTargetVersion="1.7" basedir = "${src.dir}" configFile="enunciate.xml">
<include name = "**/*.java"/>
<classpath refid= "enunciate.classpath"/>
<export artifactId="war.file" destination="${tomcat.home}/webapps/sample_enunciate.war"/>


It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!