private ClassLoader resourceClassLoader;
public void execute() throws MojoExecutionException {
List<Class<?>> resourceClasses = loadResourceClasses();
initClassResourceInfoList(resourceClasses);
WadlGenerator wadlGenerator = new WadlGenerator(getBus());
DocumentationProvider documentationProvider = null;
if (docProvider != null) {
try {
documentationProvider = (DocumentationProvider)getClassLoader().loadClass(docProvider).
getConstructor(new Class[] {String.class}).
newInstance(new Object[] {project.getBuild().getDirectory()});
wadlGenerator.setDocumentationProvider(documentationProvider);
} catch (Exception e) {
throw new MojoExecutionException(e.getMessage(), e);
}
}
setExtraProperties(wadlGenerator);
StringBuilder sbMain = wadlGenerator.generateWADL(getBaseURI(), classResourceInfos, useJson, null, null);
getLog().debug("the wadl is =====> \n" + sbMain.toString());
generateWadl(resourceClasses, sbMain.toString());
}