}
mojoScanner.setActiveExtractors( extractors );
// TODO: could use this more, eg in the writing of the plugin descriptor!
PluginDescriptor pluginDescriptor = new PluginDescriptor();
pluginDescriptor.setGroupId( project.getGroupId() );
pluginDescriptor.setArtifactId( project.getArtifactId() );
pluginDescriptor.setVersion( project.getVersion() );
pluginDescriptor.setGoalPrefix( goalPrefix );
pluginDescriptor.setName( project.getName() );
pluginDescriptor.setDescription( project.getDescription() );
if ( encoding == null || encoding.length() < 1 )
{
getLog().warn( "Using platform encoding (" + ReaderFactory.FILE_ENCODING
+ " actually) to read mojo metadata, i.e. build is platform dependent!" );
}
else
{
getLog().info( "Using '" + encoding + "' encoding to read mojo metadata." );
}
try
{
pluginDescriptor.setDependencies( GeneratorUtils.toComponentDependencies( project.getRuntimeDependencies() ) );
PluginToolsRequest request = new DefaultPluginToolsRequest( project, pluginDescriptor );
request.setEncoding( encoding );
request.setSkipErrorNoDescriptorsFound( skipErrorNoDescriptorsFound );
request.setDependencies( dependencies );