pluginDescriptor.setDependencies( PluginUtils.toComponentDependencies( project.getDependencies() ) );
scanner.populatePluginDescriptor( project, pluginDescriptor );
// Create the generator.
Generator generator = null;
if ( mode.equals( "descriptor" ) )
{
generator = new PluginDescriptorGenerator();
}
else if ( mode.equals( "xdoc" ) )
{
generator = new PluginXdocGenerator();
}
// Use the generator to process the discovered descriptors and produce
// something with them.
generator.execute( new File( outputDirectory ), pluginDescriptor );
}