
javax to jakarta Migration
OfficialFreeStreamline your Java code migration to Jakarta EE.
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 source1. Install with the skills CLI
npx skills add github/awesome-copilot/javax-to-jakarta-migration --agent claude-code2. 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 githubjavax → 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 JDKjavax.naming.*— part of JDK (JNDI)javax.crypto.*— part of JDKjavax.net.*— part of JDKjavax.security.auth.*— part of JDKjavax.swing.*,javax.xml.parsers.*— JDK packages
Step 2 — Update pom.xml
Replace dependency coordinates:
| Old | New |
|---|---|
javax.servlet:javax.servlet-api | jakarta.servlet:jakarta.servlet-api:6.0.0 |
javax.persistence:javax.persistence-api | jakarta.persistence:jakarta.persistence-api:3.1.0 |
javax.validation:validation-api | jakarta.validation:jakarta.validation-api:3.0.2 |
javax.annotation:javax.annotation-api | jakarta.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
- Run
mvn clean compileorgradlew build— fix any compilation errors - Run
mvn testorgradlew test— ensure all tests pass - 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
React Composition Patterns
Streamline your React component architecture with proven patterns.
Pester Should Migration
Easily convert Pester v5 assertions to v6 syntax.
Radix to Base UI Migration
Seamlessly migrate React components from Radix UI to Base UI.
Migrate Next.js to Vinext
Seamlessly transition your Next.js projects to Vinext.
WinUI 3 Migration Guide
Streamline your UWP to WinUI 3 migration process.
Refactor
Enhance code maintainability without altering behavior.
