Class MavenPlugin
- java.lang.Object
-
- org.sonarsource.scanner.maven.bootstrap.MavenPlugin
-
public class MavenPlugin extends Object
A class to handle maven plugins- Since:
- 1.10
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetParameter(String key)Gets a parameter of the plugin based on its keystatic MavenPlugingetPlugin(org.apache.maven.project.MavenProject pom, String groupId, String artifactId)Returns a plugin from a pom based on its group id and artifact id
-
-
-
Method Detail
-
getParameter
public String getParameter(String key)
Gets a parameter of the plugin based on its key- Parameters:
key- the param key- Returns:
- the parameter if exist, null otherwise
-
getPlugin
@CheckForNull public static MavenPlugin getPlugin(org.apache.maven.project.MavenProject pom, String groupId, String artifactId)
Returns a plugin from a pom based on its group id and artifact idIt searches in the build section, then the reporting section and finally the pluginManagement section
- Parameters:
pom- the project pomgroupId- the plugin group idartifactId- the plugin artifact id- Returns:
- the plugin if it exists, null otherwise
-
-