throw new MojoExecutionException( "The baseUri attribute is required but not defined." );
}
try {
com.sun.jersey.server.wadl.WadlGenerator wadlGenerator = new WadlGeneratorJAXBGrammarGenerator();
if ( _wadlGenerators != null ) {
for ( WadlGeneratorDescription wadlGeneratorDescription : _wadlGenerators ) {
wadlGenerator = loadWadlGenerator( wadlGeneratorDescription, wadlGenerator );
}
}
wadlGenerator.init();
final ApplicationDescription ad = this.createApplicationDescription(this._packagesResourceConfig, wadlGenerator);
final Application a = ad.getApplication();
for(Resources resources : a.getResources())
resources.setBase(_baseUri);
this.writeExternalGrammars(ad);
final JAXBContext c = JAXBContext.newInstance( wadlGenerator.getRequiredJaxbContextPath(),
Thread.currentThread().getContextClassLoader() );
final Marshaller m = c.createMarshaller();
m.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, _formatWadlFile );
// m.setProperty( "com.sun.xml.bind.namespacePrefixMapper", new NamespacePrefixMapperImpl() );
// m.setProperty( "com.sun.xml.bind.characterEscapeHandler", new CustomCharacterEscapeHandler() );