Class MavenPlugin


  • public class MavenPlugin
    extends Object
    A class to handle maven plugins
    Since:
    1.10
    • 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 id

        It searches in the build section, then the reporting section and finally the pluginManagement section

        Parameters:
        pom - the project pom
        groupId - the plugin group id
        artifactId - the plugin artifact id
        Returns:
        the plugin if it exists, null otherwise