Package org.apache.maven.cling.invoker.mvnup.goals


package org.apache.maven.cling.invoker.mvnup.goals
Maven Upgrade Tool Goals and Strategies.

This package contains the implementation of the Maven upgrade tool (mvnup) that helps upgrade Maven projects to be compatible with Maven 4. The tool is organized around a goal-based architecture with pluggable upgrade strategies.

Architecture Overview

Goals

  • Check - Analyzes projects and reports needed upgrades
  • Apply - Applies upgrades to project files
  • Help - Displays usage information

Upgrade Strategies

The tool uses a strategy pattern to handle different types of upgrades:

Utility Classes

Usage Examples

Check for Available Upgrades

mvnup check

Apply All Upgrades

mvnup apply --all

Upgrade to Maven 4.1.0 with Inference

mvnup apply --model 4.1.0 --infer

Extension Points

To add new upgrade strategies:

  1. Implement UpgradeStrategy
  2. Optionally extend AbstractUpgradeStrategy
  3. Annotate with @Named and @Singleton
  4. Use @Priority to control execution order
Since:
4.0.0