|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.batch.maven.MavenPlugin
@Deprecated public class MavenPlugin
A class to handle maven plugins
Constructor Summary | |
---|---|
MavenPlugin(org.apache.maven.model.Plugin plugin)
Deprecated. Creates a MavenPlugin based on a Plugin |
|
MavenPlugin(String groupId,
String artifactId,
String version)
Deprecated. Creates a Maven plugin based on artifact + group + version |
Method Summary | |
---|---|
MavenPlugin |
addParameter(String key,
String value)
Deprecated. Adds a parameter to the maven plugin |
org.codehaus.plexus.util.xml.Xpp3Dom |
getConfigurationXmlNode()
Deprecated. |
String |
getParameter(String key)
Deprecated. Gets a parameter of the plugin based on its key |
String[] |
getParameters(String key)
Deprecated. Gets a list of parameters of the plugin from a param key |
org.apache.maven.model.Plugin |
getPlugin()
Deprecated. |
static MavenPlugin |
getPlugin(org.apache.maven.project.MavenProject pom,
String groupId,
String artifactId)
Deprecated. Returns a plugin from a pom based on its group id and artifact id |
boolean |
hasConfiguration()
Deprecated. |
static MavenPlugin |
registerPlugin(org.apache.maven.project.MavenProject pom,
String groupId,
String artifactId,
String version,
boolean overrideVersion)
Deprecated. Registers a plugin in a project pom |
void |
removeParameter(String key)
Deprecated. Remove a parameter from the maven plugin based on its key |
void |
removeParameters()
Deprecated. Removes all parameters from the maven plugin |
MavenPlugin |
setParameter(String key,
String value)
Deprecated. Sets a parameter for the maven plugin. |
void |
setParameter(String key,
String value,
boolean override)
Deprecated. Sets a parameter to the maven plugin. |
MavenPlugin |
setVersion(String version)
Deprecated. Sets the maven plugin version |
String |
toString()
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MavenPlugin(org.apache.maven.model.Plugin plugin)
plugin
- the pluginpublic MavenPlugin(String groupId, String artifactId, String version)
groupId
- the group idartifactId
- the artifact idversion
- the versionMethod Detail |
---|
public org.codehaus.plexus.util.xml.Xpp3Dom getConfigurationXmlNode()
public MavenPlugin setVersion(String version)
version
- the version
public org.apache.maven.model.Plugin getPlugin()
public String getParameter(String key)
key
- the param key
public String[] getParameters(String key)
key
- param key with option-index snippet: e.g. item[0], item[1]. If no index snippet is passed, then
0 is default (index <=> index[0])
public MavenPlugin setParameter(String key, String value)
key
- the param keyvalue
- the param value
public void setParameter(String key, String value, boolean override)
key
- the param keyvalue
- the param valueoverride
- whether to override existing parameterpublic void removeParameters()
public MavenPlugin addParameter(String key, String value)
key
- the param key with option-index snippet: e.g. item[0], item[1]. If no index snippet is passed, then
0 is default (index <=> index[0])value
- the param value
public void removeParameter(String key)
key
- param key with option-index snippet: e.g. item[0], item[1]. If no index snippet is passed, then
0 is default (index <=> index[0])public boolean hasConfiguration()
public static MavenPlugin registerPlugin(org.apache.maven.project.MavenProject pom, String groupId, String artifactId, String version, boolean overrideVersion)
Adds the plugin if it does not exist or amend its version if it does exist and specified
pom
- the project pomgroupId
- the plugin group idartifactId
- the plugin artifact idversion
- the plugin versionoverrideVersion
- whether to override the version if the plugin is already registered
public static MavenPlugin getPlugin(org.apache.maven.project.MavenProject pom, String groupId, String artifactId)
It searches in the build section, then the reporting section and finally the pluginManagement section
pom
- the project pomgroupId
- the plugin group idartifactId
- the plugin artifact id
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |