Class MavenPlugin
java.lang.Object
org.sonarsource.scanner.maven.bootstrap.MavenPlugin
A class to handle maven plugins
- Since:
- 1.10
-
Method Summary
Modifier and TypeMethodDescriptiongetParameter(String key) Gets a parameter of the plugin based on its keystatic MavenPluginReturns a plugin from a pom based on its group id and artifact id
-
Method Details
-
getParameter
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
-