Class Plugin

    • Constructor Detail

      • Plugin

        public Plugin()
    • Method Detail

      • addDependency

        public void addDependency(Dependency dependency)
        Method addDependency.
        Parameters:
        dependency -
      • addExecution

        public void addExecution(PluginExecution pluginExecution)
        Method addExecution.
        Parameters:
        pluginExecution -
      • getArtifactId

        public String getArtifactId()
        Get the artifact ID of the plugin in the repository.
        Returns:
        String
      • getDependencies

        public List<Dependency> getDependencies()
        Method getDependencies.
        Returns:
        List
      • getExecutions

        public List<PluginExecution> getExecutions()
        Method getExecutions.
        Returns:
        List
      • getExtensions

        public String getExtensions()
        Get whether to load Maven extensions (such as packaging and type handlers) from this plugin. For performance reasons, this should only be enabled when necessary. Note: While the type of this field is String for technical reasons, the semantic type is actually Boolean. Default value is false.
        Returns:
        String
      • getGoals

        public Object getGoals()
        Get Deprecated. Unused by Maven.
        Returns:
        Object
      • getGroupId

        public String getGroupId()
        Get the group ID of the plugin in the repository.
        Returns:
        String
      • getVersion

        public String getVersion()
        Get the version (or valid range of versions) of the plugin to be used.
        Returns:
        String
      • removeDependency

        public void removeDependency(Dependency dependency)
        Method removeDependency.
        Parameters:
        dependency -
      • removeExecution

        public void removeExecution(PluginExecution pluginExecution)
        Method removeExecution.
        Parameters:
        pluginExecution -
      • setArtifactId

        public void setArtifactId(String artifactId)
        Set the artifact ID of the plugin in the repository.
        Parameters:
        artifactId -
      • setDependencies

        public void setDependencies(List<Dependency> dependencies)
        Set additional dependencies that this project needs to introduce to the plugin's classloader.
        Parameters:
        dependencies -
      • setExecutions

        public void setExecutions(List<PluginExecution> executions)
        Set multiple specifications of a set of goals to execute during the build lifecycle, each having (possibly) a different configuration.
        Parameters:
        executions -
      • setExtensions

        public void setExtensions(String extensions)
        Set whether to load Maven extensions (such as packaging and type handlers) from this plugin. For performance reasons, this should only be enabled when necessary. Note: While the type of this field is String for technical reasons, the semantic type is actually Boolean. Default value is false.
        Parameters:
        extensions -
      • setGoals

        public void setGoals(Object goals)
        Set Deprecated. Unused by Maven.
        Parameters:
        goals -
      • setGroupId

        public void setGroupId(String groupId)
        Set the group ID of the plugin in the repository.
        Parameters:
        groupId -
      • setVersion

        public void setVersion(String version)
        Set the version (or valid range of versions) of the plugin to be used.
        Parameters:
        version -
      • isExtensions

        public boolean isExtensions()
      • setExtensions

        public void setExtensions(boolean extensions)
      • flushExecutionMap

        public void flushExecutionMap()
        Reset the executionMap field to null
      • getId

        public String getId()
        Gets the identifier of the plugin.
        Returns:
        The plugin id in the form <groupId>:<artifactId>:<version>, never null.
      • getKey

        public String getKey()
        Returns:
        the key of the plugin, ie groupId:artifactId
      • constructKey

        public static String constructKey(String groupId,
                                          String artifactId)
        Parameters:
        groupId -
        artifactId -
        Returns:
        the key of the plugin, ie groupId:artifactId