New to Claude Skills? Learn how to install them →

Jgithub on GitHub

javax to jakarta Migration

OfficialFree

Streamline your Java code migration to Jakarta EE.

by github37.7k stars on github/awesome-copilot
2 views
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What javax to jakarta Migration does

The javax to jakarta Migration skill provides a structured approach for developers upgrading Java applications to the Jakarta EE namespace. This skill is particularly useful when transitioning to Tomcat 11 or Jakarta EE 10, where the javax.* imports are deprecated in favor of jakarta.*. By following the outlined steps, developers can ensure a smooth migration process, reducing the risk of errors and maintaining application functionality.

The migration process begins with scanning the codebase for all instances of javax.* imports that require updating. The skill clearly lists the packages that need to be migrated, such as javax.servlet and javax.persistence, while also specifying which packages should remain in the javax namespace. This clarity helps developers avoid common pitfalls during migration.

After identifying the necessary imports, the skill guides users through updating the project's pom.xml file to reflect the new dependency coordinates for Jakarta libraries. This step is crucial as it ensures that the application is linked to the correct versions of the Jakarta APIs. Additionally, if a web.xml file is present, the skill provides instructions for updating the XML namespace to the new Jakarta format.

Finally, developers will replace all javax imports in their Java source files with their jakarta equivalents. The skill emphasizes the importance of validating the migration by running build and test commands to catch any compilation errors or remaining javax imports. The output of the migration process includes a summary of all changes made, aiding in documentation and future reference.

When to use it

Use this skill when upgrading applications to Tomcat 11 or Jakarta EE 10, or when reviewing code for javax imports.

When not to use it

This skill is not suitable for projects that do not use javax imports or are not transitioning to Jakarta EE.

What you can build with it

Upgrading a Legacy Application

When transitioning a legacy Java application to Jakarta EE 10, this skill simplifies the migration process by providing clear instructions.

Code Review for javax Imports

During a code review, if javax imports are detected, this skill can guide developers through the necessary migration steps.

Preparing for Tomcat 11 Deployment

Before deploying to Tomcat 11, use this skill to ensure all javax imports are updated to their jakarta equivalents.

How to install javax to jakarta Migration

View source

1. Install with the skills CLI

npx skills add github/awesome-copilot/javax-to-jakarta-migration --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by github

javax → jakarta Migration Skill

When to Use

  • Upgrading to Tomcat 11 / Jakarta EE 10+
  • Code review detects javax.* imports
  • Migrating an existing project to the jakarta namespace

Procedure

Step 1 — Scan for javax Usage

Search the codebase for all javax.* imports that need migration:

javax.servlet.*      → jakarta.servlet.*
javax.persistence.*  → jakarta.persistence.*
javax.validation.*   → jakarta.validation.*
javax.annotation.*   → jakarta.annotation.*
javax.inject.*       → jakarta.inject.*
javax.enterprise.*   → jakarta.enterprise.*
javax.faces.*        → jakarta.faces.*
javax.ws.rs.*        → jakarta.ws.rs.*
javax.el.*           → jakarta.el.*
javax.json.*         → jakarta.json.*
javax.mail.*         → jakarta.mail.*
javax.websocket.*    → jakarta.websocket.*

Do NOT migrate these (they remain in javax.*):

  • javax.sql.* — part of JDK
  • javax.naming.* — part of JDK (JNDI)
  • javax.crypto.* — part of JDK
  • javax.net.* — part of JDK
  • javax.security.auth.* — part of JDK
  • javax.swing.*, javax.xml.parsers.* — JDK packages

Step 2 — Update pom.xml

Replace dependency coordinates:

OldNew
javax.servlet:javax.servlet-apijakarta.servlet:jakarta.servlet-api:6.0.0
javax.persistence:javax.persistence-apijakarta.persistence:jakarta.persistence-api:3.1.0
javax.validation:validation-apijakarta.validation:jakarta.validation-api:3.0.2
javax.annotation:javax.annotation-apijakarta.annotation:jakarta.annotation-api:2.1.1

Step 3 — Update web.xml (if present)

<!-- Old namespace -->
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="4.0">

<!-- New namespace -->
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee" version="6.0">

Step 4 — Update Java Source Files

Replace all javax. imports with jakarta. equivalents in .java files.

Step 5 — Verify

  1. Run mvn clean compile or gradlew build — fix any compilation errors
  2. Run mvn test or gradlew test — ensure all tests pass
  3. Search for any remaining javax.* imports (excluding JDK packages)

Output

Provide a migration summary listing all files changed, imports replaced, and any manual steps required.

Frequently asked questions about javax to jakarta Migration

Similar skills