options.setSpecVersion(SpecVersion.fromName(specVersion));
if ( specVersion != null && options.getSpecVersion() == null ) {
throw new BuildException("Unknown spec version specified: " + specVersion);
}
final SCRDescriptorGenerator generator = new SCRDescriptorGenerator( scrLog );
// setup from plugin configuration
generator.setOptions(options);
generator.setProject(project);
generator.execute();
} catch ( final SCRDescriptorException sde ) {
if ( sde.getSourceLocation() != null ) {
final Location loc = new Location( sde.getSourceLocation(), -1, 0 );
throw new BuildException( sde.getMessage(), sde.getCause(), loc );
}