throw new InvalidPluginDescriptorException( "Failed to get source files from " + srcRoot, e); compileClasspathElements = project.getCompileClasspathElements(); } catch (DependencyResolutionRequiredException e) { throw new InvalidPluginDescriptorException( "Failed to get compileClasspathElements.", e); path = url.getPath(); } catch (Exception e) { throw new InvalidPluginDescriptorException( "Failed to get classpath files from " + url, e); throw new InvalidPluginDescriptorException( "Failed to extract plugin descriptor.", t);
throw new MojoExecutionException( "Error extracting plugin descriptor: \'" + e.getLocalizedMessage() + "\'", e );
getLog().warn(format("Plugin without mojos. %s\nMojoScanner:%s", e.getMessage(), mojoScanner.getClass()));
throw new InvalidPluginDescriptorException( "No mojo definitions were found for plugin: " + request.getPluginDescriptor().getPluginLookupKey() + "." );
private MojoDescriptor createMojoDescriptor( String basedir, String resource, PluginDescriptor pluginDescriptor ) throws InvalidPluginDescriptorException { MojoDescriptor mojoDescriptor = new MojoDescriptor(); mojoDescriptor.setPluginDescriptor( pluginDescriptor ); mojoDescriptor.setLanguage( "bsh" ); mojoDescriptor.setComponentConfigurator( "bsh" ); mojoDescriptor.setImplementation( resource ); Interpreter interpreter = new Interpreter(); try { interpreter.set( "file", new File( basedir, resource ) ); interpreter.set( "mojoDescriptor", mojoDescriptor ); interpreter.eval( new InputStreamReader( getClass().getResourceAsStream( "/extractor.bsh" ) ) ); } catch ( EvalError evalError ) { throw new InvalidPluginDescriptorException( "Error scanning beanshell script", evalError ); } return mojoDescriptor; }
throw new InvalidPluginDescriptorException( "No mojo definitions were found for plugin: " + request.getPluginDescriptor().getPluginLookupKey() + "." );
throw new InvalidPluginDescriptorException( "Error scanning beanshell script", evalError ); throw new InvalidPluginDescriptorException( "Unsupported encoding while reading beanshell script", uee );
throw new InvalidPluginDescriptorException( "Found orphaned plugin metadata file: " + metadataFile );
throw new InvalidPluginDescriptorException( "@execute tag requires a 'phase' or 'goal' parameter" ); throw new InvalidPluginDescriptorException( "@execute tag can have only one of a 'phase' or 'goal' parameter" ); if ( mojoDescriptor.getExecuteGoal() != null ) throw new InvalidPluginDescriptorException( "@execute lifecycle requires a phase instead of a goal" );
throw new InvalidPluginDescriptorException( javaClass.getFullyQualifiedName() + ": @execute tag requires either a 'phase' or 'goal' parameter" ); throw new InvalidPluginDescriptorException( javaClass.getFullyQualifiedName() + ": @execute tag can have only one of a 'phase' or 'goal' parameter" ); if ( mojoDescriptor.getExecuteGoal() != null ) throw new InvalidPluginDescriptorException( javaClass.getFullyQualifiedName() + ": @execute lifecycle requires a phase instead of a goal" );