Refine search
DefaultPluginPrefixResult( Plugin plugin ) { groupId = plugin.getGroupId(); artifactId = plugin.getArtifactId(); }
private Plugin findPlugin( String groupId, String artifactId, Collection<Plugin> plugins ) { for ( Plugin plugin : plugins ) { if ( artifactId.equals( plugin.getArtifactId() ) && groupId.equals( plugin.getGroupId() ) ) { return plugin; } } return null; }
private Plugin findPlugin( String groupId, String artifactId, Collection<Plugin> plugins ) { for ( Plugin plugin : plugins ) { if ( artifactId.equals( plugin.getArtifactId() ) && groupId.equals( plugin.getGroupId() ) ) { return plugin; } } return null; }
private boolean isSitePlugin( Plugin plugin ) { return "maven-site-plugin".equals( plugin.getArtifactId() ) && "org.apache.maven.plugins".equals( plugin.getGroupId() ); }
public PluginManagerException( Plugin plugin, String message, MavenProject project ) { super( message ); pluginGroupId = plugin.getGroupId(); pluginArtifactId = plugin.getArtifactId(); pluginVersion = plugin.getVersion(); this.project = project; }
public PluginNotFoundException( Plugin plugin, List<ArtifactRepository> remoteRepositories ) { super( "Plugin could not be found, please check its coordinates for typos and ensure the required" + " plugin repositories are defined in the POM", plugin.getGroupId(), plugin.getArtifactId(), plugin.getVersion(), "maven-plugin", null, remoteRepositories, null ); this.plugin = plugin; }
protected PluginManagerException( Plugin plugin, String message, MavenProject project, Throwable cause ) { super( message, cause ); this.project = project; pluginGroupId = plugin.getGroupId(); pluginArtifactId = plugin.getArtifactId(); pluginVersion = plugin.getVersion(); }
public PluginManagerException( Plugin plugin, String message, Throwable cause ) { super( message, cause ); pluginGroupId = plugin.getGroupId(); pluginArtifactId = plugin.getArtifactId(); pluginVersion = plugin.getVersion(); }
public PluginManagerException( Plugin plugin, String message, PlexusContainerException cause ) { super( message, cause ); pluginGroupId = plugin.getGroupId(); pluginArtifactId = plugin.getArtifactId(); pluginVersion = plugin.getVersion(); }
public PluginManagerException( Plugin plugin, InvalidVersionSpecificationException cause ) { super( cause ); pluginGroupId = plugin.getGroupId(); pluginArtifactId = plugin.getArtifactId(); pluginVersion = plugin.getVersion(); }
public PluginManagerException( Plugin plugin, String message, ComponentRepositoryException cause ) { super( message, cause ); pluginGroupId = plugin.getGroupId(); pluginArtifactId = plugin.getArtifactId(); pluginVersion = plugin.getVersion(); }
public PluginManagerException( Plugin plugin, String message, PlexusConfigurationException cause ) { super( message, cause ); pluginGroupId = plugin.getGroupId(); pluginArtifactId = plugin.getArtifactId(); pluginVersion = plugin.getVersion(); }
private Plugin findPlugin( Plugin plugin, Collection<Plugin> plugins ) { return findPlugin( plugin.getGroupId(), plugin.getArtifactId(), plugins ); }
/** * Gets the identifier of the plugin. * * @return The plugin id in the form {@code <groupId>:<artifactId>:<version>}, never {@code null}. */ public String getId() { StringBuilder id = new StringBuilder( 128 ); id.append( ( getGroupId() == null ) ? "[unknown-group-id]" : getGroupId() ); id.append( ":" ); id.append( ( getArtifactId() == null ) ? "[unknown-artifact-id]" : getArtifactId() ); id.append( ":" ); id.append( ( getVersion() == null ) ? "[unknown-version]" : getVersion() ); return id.toString(); }
private static String getKey( Plugin plugin, boolean extension ) { String version = ArtifactUtils.toSnapshotVersion( plugin.getVersion() ); return ( extension ? "extension>" : "plugin>" ) + plugin.getGroupId() + ":" + plugin.getArtifactId() + ":" + version; }
PluginDescriptor getPluginDescriptor(MavenProject project, Plugin plugin) throws InvocationTargetException, IllegalAccessException, MojoFailureException { try { Method loadPlugin = pluginManager.getClass().getMethod("loadPluginDescriptor", plugin.getClass(), project.getClass(), session.getClass()); return (PluginDescriptor) loadPlugin.invoke(pluginManager, plugin, project, session); } catch (NoSuchMethodException exp) { try { // Fallback for older Maven versions RepositorySystemSession repositorySession = session.getRepositorySession(); Method loadPlugin = pluginManager.getClass().getMethod("loadPlugin", plugin.getClass(), project.getRemotePluginRepositories().getClass(), repositorySession.getClass()); return (PluginDescriptor) loadPlugin.invoke(pluginManager, plugin, project.getRemotePluginRepositories(), repositorySession); } catch (NoSuchMethodException exp2) { throw new MojoFailureException("Cannot load plugin descriptor for plugin " + plugin.getGroupId() + ":" + plugin.getArtifactId(),exp2); } } }
public static boolean pluginEquals( Plugin a, Plugin b ) { return Objects.equals( a.getArtifactId(), b.getArtifactId() ) // && Objects.equals( a.getGroupId(), b.getGroupId() ) // && Objects.equals( a.getVersion(), b.getVersion() ) // && a.isExtensions() == b.isExtensions() // && dependenciesEquals( a.getDependencies(), b.getDependencies() ); }
if ( groupId.equals( plugin.getGroupId() ) && artifactId.equals( plugin.getArtifactId() ) ) if ( groupId.equals( plugin.getGroupId() ) && artifactId.equals( plugin.getArtifactId() ) )
public PluginArtifact( Plugin plugin, Artifact pluginArtifact ) { super( plugin.getGroupId(), plugin.getArtifactId(), plugin.getVersion(), null, "maven-plugin", null, new PluginArtifactHandler() ); this.plugin = plugin; setFile( pluginArtifact.getFile() ); setResolved( true ); }
public Artifact createPluginArtifact( Plugin plugin ) { VersionRange versionRange; try { String version = plugin.getVersion(); if ( StringUtils.isEmpty( version ) ) { version = "RELEASE"; } versionRange = VersionRange.createFromVersionSpec( version ); } catch ( InvalidVersionSpecificationException e ) { return null; } return createPluginArtifactX( plugin.getGroupId(), plugin.getArtifactId(), versionRange ); }