Class PluginUpgradeStrategy

java.lang.Object
org.apache.maven.cling.invoker.mvnup.goals.AbstractUpgradeStrategy
org.apache.maven.cling.invoker.mvnup.goals.PluginUpgradeStrategy
All Implemented Interfaces:
UpgradeStrategy

@Named @Singleton @Priority(10) public class PluginUpgradeStrategy extends AbstractUpgradeStrategy
Strategy for upgrading Maven plugins to recommended versions. Handles plugin version upgrades in build/plugins and build/pluginManagement sections.
  • Constructor Details

    • PluginUpgradeStrategy

      @Inject public PluginUpgradeStrategy()
  • Method Details

    • isApplicable

      public boolean isApplicable(UpgradeContext context)
      Description copied from interface: UpgradeStrategy
      Checks if this strategy is applicable given the current options.
      Parameters:
      context - the upgrade context
      Returns:
      true if this strategy should be applied
    • getDescription

      public String getDescription()
      Description copied from interface: UpgradeStrategy
      Gets a description of what this strategy does.
      Returns:
      a human-readable description of the strategy
    • doApply

      public UpgradeResult doApply(UpgradeContext context, Map<Path, org.jdom2.Document> pomMap)
      Description copied from class: AbstractUpgradeStrategy
      Subclasses implement the actual upgrade logic here.
      Specified by:
      doApply in class AbstractUpgradeStrategy
      Parameters:
      context - the upgrade context
      pomMap - map of all POM files in the project
      Returns:
      the result of the upgrade operation
    • getPluginUpgrades

      public static List<PluginUpgrade> getPluginUpgrades()
      Gets the list of plugin upgrades to apply.