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
Strategy for upgrading Maven plugins to recommended versions.
Handles plugin version upgrades in build/plugins and build/pluginManagement sections.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Holds plugin upgrade information for Maven 4 compatibility. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoApply
(UpgradeContext context, Map<Path, org.jdom2.Document> pomMap) Subclasses implement the actual upgrade logic here.Gets a description of what this strategy does.static List
<PluginUpgrade> Gets the list of plugin upgrades to apply.boolean
isApplicable
(UpgradeContext context) Checks if this strategy is applicable given the current options.Methods inherited from class org.apache.maven.cling.invoker.mvnup.goals.AbstractUpgradeStrategy
apply, getOptions, logSummary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.maven.cling.invoker.mvnup.goals.UpgradeStrategy
isOptionEnabled
-
Constructor Details
-
PluginUpgradeStrategy
-
-
Method Details
-
isApplicable
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
Description copied from interface:UpgradeStrategy
Gets a description of what this strategy does.- Returns:
- a human-readable description of the strategy
-
doApply
Description copied from class:AbstractUpgradeStrategy
Subclasses implement the actual upgrade logic here.- Specified by:
doApply
in classAbstractUpgradeStrategy
- Parameters:
context
- the upgrade contextpomMap
- map of all POM files in the project- Returns:
- the result of the upgrade operation
-
getPluginUpgrades
Gets the list of plugin upgrades to apply.
-