public abstract class AbstractPluginFacet extends AbstractBaseFacet
pluginArtifact
,
configurations
,
dependencies
, and
executions
Modifier and Type | Field and Description |
---|---|
protected Collection<org.jboss.forge.addon.maven.plugins.ConfigurationElement> |
configurations
Configurations for the plugin.
|
protected Collection<org.jboss.forge.addon.dependencies.builder.DependencyBuilder> |
dependencies
Dependencies for the plugin.
|
protected Collection<org.jboss.forge.addon.maven.plugins.Execution> |
executions
Executions for the plugin.
|
protected ArtifactVault.DependencyArtifact |
pluginArtifact
The Maven artifact of the plugin to be installed.
|
MAIN_PROFILE
Constructor and Description |
---|
AbstractPluginFacet() |
Modifier and Type | Method and Description |
---|---|
Collection<org.jboss.forge.addon.maven.plugins.ConfigurationElement> |
getConfigurations() |
Collection<org.jboss.forge.addon.dependencies.builder.DependencyBuilder> |
getDependencies() |
Collection<org.jboss.forge.addon.maven.plugins.Execution> |
getExecutions() |
ArtifactVault.DependencyArtifact |
getPluginArtifact() |
protected void |
init()
This method is invoked exactly once after a project has been set for this facet.
|
boolean |
install() |
boolean |
isInstalled() |
protected static boolean |
isMatchingConfiguration(org.jboss.forge.addon.maven.plugins.Configuration config,
Collection<org.jboss.forge.addon.maven.plugins.ConfigurationElement> elements)
Check that a
Configuration is consistent with a collection of
ConfigurationElements . |
protected void |
maybeInit() |
protected org.jboss.forge.addon.maven.plugins.ConfigurationElement |
merge(org.jboss.forge.addon.maven.plugins.ConfigurationElement prev,
org.jboss.forge.addon.maven.plugins.ConfigurationElement configElem)
Recursively merge two configuration elements.
|
protected void |
mergeConfigurationElement(org.jboss.forge.addon.maven.plugins.Configuration config,
org.jboss.forge.addon.maven.plugins.ConfigurationElement configElem)
Merge a
ConfigurationElement into a Configuration . |
boolean |
uninstall() |
addDependenciesToProfile, error, getDependency, getDependency, getProject, hasDependency, hasProvidedDependency, warning
equals, getFaceted, hashCode, setFaceted
protected ArtifactVault.DependencyArtifact pluginArtifact
protected Collection<org.jboss.forge.addon.maven.plugins.ConfigurationElement> configurations
protected Collection<org.jboss.forge.addon.dependencies.builder.DependencyBuilder> dependencies
protected Collection<org.jboss.forge.addon.maven.plugins.Execution> executions
public ArtifactVault.DependencyArtifact getPluginArtifact()
public Collection<org.jboss.forge.addon.maven.plugins.ConfigurationElement> getConfigurations()
public Collection<org.jboss.forge.addon.dependencies.builder.DependencyBuilder> getDependencies()
public Collection<org.jboss.forge.addon.maven.plugins.Execution> getExecutions()
public boolean install()
public boolean isInstalled()
protected static boolean isMatchingConfiguration(org.jboss.forge.addon.maven.plugins.Configuration config, Collection<org.jboss.forge.addon.maven.plugins.ConfigurationElement> elements)
Configuration
is consistent with a collection of
ConfigurationElements
.
A configuration is consistent with a collection if for any element in the
collection, elem
, there exists an element in the configuration,
other
, such that
isMatchingElement
(elem, matching)
is true
.config
- A Maven plugin configuration.elements
- A set of configuration elements for a Maven plugin.public boolean uninstall()
uninstall
in interface org.jboss.forge.addon.facets.Facet<org.jboss.forge.addon.projects.Project>
uninstall
in class org.jboss.forge.addon.facets.AbstractFacet<org.jboss.forge.addon.projects.Project>
protected void mergeConfigurationElement(org.jboss.forge.addon.maven.plugins.Configuration config, org.jboss.forge.addon.maven.plugins.ConfigurationElement configElem)
ConfigurationElement
into a Configuration
. If there
is no element in the given configuration with a name matching the given
element, the element is simply added. Otherwise, the two elements will be
recursively merged, with any conflicting values in the configuration being
overwritten.config
- A Maven plugin configuration.configElem
- A Maven plugin configuration element.protected org.jboss.forge.addon.maven.plugins.ConfigurationElement merge(org.jboss.forge.addon.maven.plugins.ConfigurationElement prev, org.jboss.forge.addon.maven.plugins.ConfigurationElement configElem)
prev
- A Maven plugin configuration element.configElem
- A Maven plugin configuration element. Values in this element and
it's children will take precedence over conflicting values in the
other argument.protected void init()
protected final void maybeInit()
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.