validator.validate( pluginDescriptor );
if ( validator.hasErrors() )
{
throw new InvalidPluginDescriptorException( "Invalid plugin descriptor for " + plugin.getId() + " ("
+ pluginFile + ")", validator.getErrors() );
}
pluginDescriptor.setPluginArtifact( pluginArtifact );