Skip to main content
plugin

modernize-java — GitHub Copilot plugin: Java upgrades

This plugin reviews a Java project, plans an upgrade, and applies code changes through GitHub Copilot CLI. It fits dependency migrations and CVE checks.

Install into GitHub Copilot · Command from the source All methods and platforms ↓
copilot plugin install modernize-java@awesome-copilot
Open on GitHub

What modernize-java does

modernize-java examines a Java project and its dependencies, then creates an upgrade plan for review and editing. Once the plan runs, the agent transforms the codebase and works through build or migration errors.

A post-upgrade pass checks for known CVEs and code inconsistencies. The plugin also produces a structured report with changed files, dependency updates, test results, and unresolved issues for pull requests or CI logs.

GitHub Copilot CLI is required. Since AI can make mistakes, review and test every change before using it in production.

What it helps with

  • inspect a Java project and its dependencies
  • create a Java upgrade plan
  • transform code after a version migration
  • resolve build and migration errors
  • check the upgraded application for CVEs

Example prompts for the agent

  • Run copilot --model claude-sonnet-4.6 --agent modernize-java:modernize-java and analyze this project.
  • Create an upgrade plan for the Java dependencies and show it before applying changes.
  • Apply the plan, fix build errors, then report file changes and CVE validation results.

How to install modernize-java

Command from the source

copilot plugin install modernize-java@awesome-copilot

Step by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own

Questions about modernize-java

How do I install modernize-java in GitHub Copilot?

Install GitHub Copilot CLI, then run copilot plugin install modernize-java@awesome-copilot.

What does modernize-java do?

It analyzes a Java project, prepares an upgrade plan, transforms the code, handles build issues, and checks the result for known CVEs.

What should I do before using its changes in production?

Review and test the generated changes. The plugin notes that AI can make mistakes while modifying code.

Source text

modernize-java · MIT
# GitHub Copilot modernization – Java Upgrade CLI Plugin

**GitHub Copilot modernization – Java Upgrade CLI Plugin** helps you upgrade your Java applications directly from the command line. It brings the same intelligent modernization capabilities as the VS Code extension to your terminal and CI/CD pipelines, enabling you to:

- Analyze your project, assess your dependencies, and generate an upgrade plan
- Execute the plan to automatically transform your codebase
- Fix build issues and resolve migration errors during the upgrade process
- Validate your application against known CVEs after the upgrade
- Output a detailed summary including file changes, updated dependencies, and upgrade results

## How to Use

### Prerequisites

Install the [GitHub Copilot CLI](https://github.com/features/copilot/cli):

```bash
npm install -g @github/copilot
```

### Installation

Once GitHub Copilot CLI is set up, install this plugin:

```bash
copilot plugin marketplace add microsoft/modernize-java
copilot plugin install modernize-java@modernize-java
```

### Quick Start

```bash
copilot --model claude-sonnet-4.6 --agent modernize-java:modernize-java
```

## Key Capabilities

### 🔍 Intelligent Analysis and Upgrade Planning

Modernization starts with understanding your code. The CLI automatically analyzes your Java project and generates a customizable upgrade plan that you can review and edit before execution.

### 🔧 Automatic Code Transformation and Error Fixing

The CLI apply code transformations, automatically resolve build issues, and run test validations — ensuring a smooth, error-free upgrade process without manual intervention.

### 🛡️ Post-Upgrade CVE Validation

After upgrade, the CLI scans for CVE (Common Vulnerabilities and Exposures) issues and code inconsistencies, then reports detected issues with suggested fixes to improve your application's security posture.

### 🔄 Upgrade Summary

At the end of each upgrade run, the CLI outputs a structured summary covering file changes, updated dependencies, test validation results, and any remaining issues — suitable for review in pull requests or CI logs.

## Feedback

We value your feedback — share [your thoughts here](https://aka.ms/AM4JFeedback) to help us continue improving the product.

# License
MIT

# Trademarks
Authorized use of Microsoft trademarks or logos must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/legal/intellectualproperty/trademarks/usage/general).

# Privacy statement
GitHub Copilot modernization uses GitHub Copilot to make code changes, which does not retain code snippets beyond the immediate session. We do not collect, transmit, or store your custom tasks. Review the [Microsoft Privacy Statement](https://go.microsoft.com/fwlink/?LinkId=521839).

Telemetry metrics are collected and analyzed to track feature usage and effectiveness. Learn more about [telemetry settings in VS Code](https://code.visualstudio.com/docs/configure/telemetry).

# Transparency note
GitHub Copilot modernization uses AI to make code changes, and AI sometimes makes mistakes. Please review and test all changes before using them in production.

# Disclaimer
Unless otherwise permitted under applicable license(s), users may not decompile, modify, repackage, or redistribute any assets, prompts, or internal tools provided as part of this product without prior written consent from Microsoft.

© microsoft · MIT · microsoft/modernize-java

Similar plugins

All plugins for Programming languages →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor