
javax-to-jakarta-migration
โ Officialโ 36,202by github ยท part of github/awesome-copilot
Migrate Java code from javax.* to jakarta.* namespace. Use when upgrading to Tomcat 11, Jakarta EE 10, or when javax imports are detected in the codebase.
This is the playbook your agent receives when the skill activates โ you don't need to read it to use the skill, but it's here to audit before installing.
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 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.
npx skills add github/awesome-copilot --skill "javax-to-jakarta-migration" --full-depthRun this in your project โ your agent picks the skill up automatically.
No common issues documented yet. If you hit a problem, the repository's GitHub Issues page is the best place to look.
Licensed under MITโ you can use, modify, and redistribute it under that license's terms.
View the full license file on GitHub โ