catch ( IOException e )
{
throw new PluginDescriptorParsingException( plugin, pluginFile.getAbsolutePath(), e );
}
MavenPluginValidator validator = new MavenPluginValidator( pluginArtifact );
validator.validate( pluginDescriptor );
if ( validator.hasErrors() )
{
throw new InvalidPluginDescriptorException( "Invalid plugin descriptor for " + plugin.getId() + " ("
+ pluginFile + ")", validator.getErrors() );
}
pluginDescriptor.setPluginArtifact( pluginArtifact );
return pluginDescriptor;