I want to document my REST Based API, so for that I searched the google and found this http://jsondoc.org/
I am using GuiceConfig to inject the objects and there I used the method JSONDocUtils.getApiDoc(servletContext, version, basePath); inside GuiceConfig.java
public void contextInitialized(ServletContextEvent servletContextEvent) {
LOGGER.info("Initializing Context : configuring juice Injector");
injector = Guice.createInjector(new Module[] { new PropertiesModule(),
................
} });
ServletContext servletContext = servletContextEvent.getServletContext();
servletContext.setAttribute(Injector.class.getName(), injector);
System.out.println("JSON DOC UTILS......");
JSONDocUtils.getApiDoc(servletContext, "1.0", "jsondoc");
}
Code is throwing an exception that "java.lang.NoClassDefFoundError: org/jsondoc/core/util/JSONDocUtils" but in reality the jar I have specified as a dependency like this
<dependency>
<groupId>org.jsondoc</groupId>
<artifactId>org.jsondoc</artifactId>
<version>1.0.2</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jsondoc-core.jar</systemPath>
</dependency>
And yes it is there in the lib folder.