Skip to main content
rule official · GitHub

java-upgrade — GitHub Copilot rule: Java version bumps in Maven

A rule that points Copilot at the java-upgrade skill whenever you change the Java version in Maven or Gradle files. Handy for LTS jumps.

Install into GitHub Copilot · Manually: put the files in place All methods and platforms ↓
.github/instructions/java-upgrade.instructions.md
Open on GitHub

What java-upgrade does

The rule fires on pom.xml, build.gradle and build.gradle.kts. When a task touches the Java version — compiler release, toolchain or java.version — Copilot reaches for the java-upgrade skill. That skill detects the current version and loads only the guide that matches: 11 → 17, 17 → 21 or 21 → 25.

No skill in the project yet? Install it with gh skills install github/awesome-copilot java-upgrade, or copy skills/java-upgrade/ from the repository. The rule itself only points the way; the skill does the work.

Two constraints sit in the rule text. Move one LTS version at a time and run the full test suite after each step. Before raising the target, check the minimum Java version your frameworks and dependencies support — skip that and the build breaks on a library that never got the memo.

What it helps with

  • bump the Java version in pom.xml without hunting for migration docs
  • move from Java 17 to 21 without skipping steps
  • check whether dependencies allow the next LTS
  • split the upgrade into stages with tests after each one
  • load the migration guide for your exact version pair only

Example prompts for the agent

  • Upgrade this project to Java 21
  • Change java.version in pom.xml to 17
  • Move the build to Java 25 and check the dependencies

How to install java-upgrade

Manually: put the files in place

.github/instructions/java-upgrade.instructions.md

The applyTo field sets which files it applies to

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about java-upgrade

How do I install java-upgrade in GitHub Copilot?

Drop .github/instructions/java-upgrade.instructions.md into the project — the rule is picked up through its applyTo paths. The skill itself installs with gh skills install github/awesome-copilot java-upgrade.

What does java-upgrade do?

It tells Copilot to use the java-upgrade skill when a task changes the Java version in Maven or Gradle files. The skill detects the current version and loads the matching migration guide.

Which version jumps are covered?

The skill loads a guide per pair: Java 11 → 17, 17 → 21 or 21 → 25. The advice is one LTS at a time, with the test suite run after each step.

Source text

java-upgrade.instructions.md · MIT
---
description: 'Pointer to the java-upgrade skill when changing the Java version in Maven or Gradle build files'
applyTo: '**/pom.xml, **/build.gradle, **/build.gradle.kts'
---

# Java Version Upgrades

When the task changes the Java version of this project (compiler release, toolchain, `java.version`), use the `java-upgrade` skill. It detects the current version and loads only the matching guide for Java 11 → 17, 17 → 21 or 21 → 25.

If the skill is not installed, install it with `gh skills install github/awesome-copilot java-upgrade` or copy `skills/java-upgrade/` from this repository.

- Upgrade one LTS version at a time and run the full test suite after each step.
- Check the minimum Java version supported by the project's frameworks and dependencies before raising the target.

© github · MIT · github/awesome-copilot

Similar IDE rules

All IDE rules for Programming languages →

From the same set732

The whole set →
no-heredoc A rule that stops the agent from writing files through terminal heredocs and redirections, because those commands corrupt content in VS Code. ★ 40,418repo stars nestjs This rule feeds GitHub Copilot a set of NestJS conventions: modules, DI, DTOs and validation. Useful when the agent writes TypeScript server code. ★ 40,418repo stars moodle This rule tells Copilot how to write Moodle code: Frankenstyle namespaces, Mustache templates, mandatory security functions. Useful when you build plugins or themes. ★ 40,418repo stars langchain-python A GitHub Copilot instruction file that steers the agent toward LangChain patterns: Runnable, LCEL, chat models, retrievers and vector stores. Useful when your Python code talks to LangChain. ★ 40,418repo stars intellij-java-kotlin A rule that keeps Copilot inside the project's build model when working on Java and Kotlin in IntelliJ IDEA, with validation that matches CI. ★ 40,418repo stars github-actions-ci-cd-best-practices A GitHub Copilot rule that guides workflow structure, token permissions, caching and matrix setups whenever you touch files under .github/workflows/. ★ 40,418repo stars genaiscript A GitHub Copilot rule that turns the assistant into a GenAIScript expert: it writes scripts and answers questions about the language. ★ 40,418repo stars draw-io Tells Copilot how to build and edit draw.io diagrams: mxGraph XML structure, a semantic colour palette, grid alignment and a validation script. ★ 40,418repo stars

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