Class CompatibilityFixStrategy

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

@Named @Singleton @Priority(20) public class CompatibilityFixStrategy extends AbstractUpgradeStrategy
Strategy for applying Maven 4 compatibility fixes to POM files. Fixes issues that prevent POMs from being processed by Maven 4.
  • Constructor Details

    • CompatibilityFixStrategy

      public CompatibilityFixStrategy()
  • 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