
IT managers running an enterprise portal on Liferay 7.x eventually face the same high-stakes conversation. You know the business needs the security patches, modern capabilities, and long-term stability of the latest platform release. Yet every time a Liferay upgrade comes up on the roadmap, engineering teams brace for weeks of tedious code remediation, broken custom modules, and difficult-to-predict testing cycles.
For organizations planning a Liferay 7.4 upgrade or moving directly onto the 2026.Q1 Long-Term Support (LTS) release, the stakes are especially clear. Liferay DXP 2026.Q1 is the current LTS version, offering a stable foundation with premium support running through March 2029. Moving onto that foundation also requires navigating the platform's major architectural transition from Java EE 8 to Jakarta EE 10, which Liferay introduced starting in 2025.Q3.
Liferay already provides strong, purpose-built command-line tools to automate much of this heavy lifting, specifically the Blade upgradeSourceCode and upgradeJakarta tasks. However, official upgrade guides and community playbooks have historically treated these tools as standalone steps in a manual developer workflow. By pairing Liferay's native upgrade utilities with an AI coding agent under the supervision of experienced architects, IT managers can turn an unpredictable AI code upgrade into a structured, transparent, and far more manageable delivery process.
Why Traditional Liferay 7.x Upgrades Stall: And What Changed in 2026
Upgrading a customized Liferay DXP environment is rarely just a matter of swapping out server binaries. Over years of operation, most enterprise portals accumulate dozens of custom OSGi modules, service wrappers, theme customizations, and third-party integrations built against older APIs.
When teams move from Liferay 7.1, 7.2, or 7.3 to modern quarterly releases, two major hurdles slow down delivery:
- Breaking API changes across versions: Internal Liferay classes, method signatures, and deprecated packages evolve over time, leaving custom modules unable to compile until every reference is updated.
- The Liferay Jakarta migration: Starting with Liferay DXP 2025.Q3, Liferay transitioned from Java EE 8 to Jakarta EE 10. In practical terms, thousands of package imports across custom Java code, descriptors, and templates must shift from the javax.* namespace to jakarta.*.
For IT leaders, the business risk is straightforward. If developers spend 70% of their upgrade budget hunting down syntax errors and repetitive namespace mismatches, less time remains for validating critical business workflows, performance tuning, and user acceptance testing.
Before bringing AI into the picture, it helps to understand what Liferay's own tooling already does well—and where it intentionally stops.
Inside Liferay Workspace, Liferay provides two essential Blade CLI tasks designed to automate predictable code transformations:
- upgradeSourceCode: This task scans your custom modules against Liferay's database of known breaking changes and automatically updates deprecated API calls, properties, and configurations. Liferay explicitly notes that while upgradeSourceCode handles known patterns reliably, it does not guarantee that the resulting code will compile cleanly on the first pass.
- upgradeJakarta: Built specifically for the Liferay Jakarta migration, this task automates the bulk conversion of javax references to jakarta across source files and project configurations.
These deterministic tools are fast, repeatable, and trusted. Yet once upgradeSourceCode and upgradeJakarta finish running, developers are typically left with a list of residual compilation errors, subtle behavioral shifts, and unfamiliar API replacements that still require hours of manual investigation.
Rather than asking an AI model to blindly rewrite an entire codebase from scratch, the most effective engineering teams use a hybrid model. Liferay's deterministic Blade tasks handle the standardized, rule-based transformations first, and an AI coding agent steps in immediately afterward to accelerate analysis, remediation, and verification.
| Upgrade Activity | Liferay Native Tooling | How an AI Coding Agent Assists | Where Human Experts Decide |
| Namespace conversion (javax to jakarta) | upgradeJakarta task | Resolves edge-case third-party library conflicts and missed configuration references. | Approving third-party dependency replacements and licensing changes. |
| Breaking API updates | upgradeSourceCode task | Interprets compiler errors, locates replacement Liferay APIs, and proposes targeted fixes. | Validating whether new API behavior matches original business logic. |
| Code comprehension and documentation | Official Liferay Learn release notes | Summarizes why an API changed in plain English and maps old patterns to modern equivalents. | Deciding when to refactor legacy custom code into out-of-the-box Liferay features. |
| Regression and unit testing | Liferay Workspace build and test runners | Generates unit tests for modified services and drafts smoke-test checklists. | Signing off on end-to-end user acceptance and security compliance. |
| Pull request and diff review | Git version control | Flags unintended logic changes, security smells, or inconsistent patterns across large diffs. | Final architectural approval before promoting code to staging and production. |
1. Resolving Compile Errors After upgradeSourceCode
After running upgradeSourceCode and upgradeJakarta, a typical enterprise codebase still surfaces dozens or hundreds of compiler errors where method parameters changed or legacy utilities were retired. An AI coding agent connected to your Liferay Workspace can read the build output, inspect the surrounding class context, cross-reference official Liferay 2026.Q1 API patterns, and propose clean, minimal patches—turning hours of documentation hunting into minutes of guided review.
2. Explaining Breaking Changes in Plain Language
Many Liferay upgrade projects are executed by teams that did not write the original Liferay 7.2 or 7.3 customizations years ago. AI agents excel at acting as an on-demand technical translator. When an older service wrapper or custom portlet breaks, the agent can explain what the legacy code was trying to accomplish, why Liferay deprecated that approach, and how modern Liferay capabilities handle the same requirement.
3. Writing Targeted Tests for Upgraded Modules
One of the biggest risks in any platform upgrade is fixing a compilation error in a way that subtly alters business behavior. Before or immediately after applying upgrade fixes, an AI agent can generate unit and integration tests around critical custom business rules—giving IT managers measurable confidence that order calculations, permission checks, or approval routing still work as intended.
4. Reviewing Large Code Diffs Before Merge
Upgrading 40 or 50 custom modules produces massive Git diffs that can easily overwhelm human reviewers. AI code review assistants perform a fast first pass across pull requests, highlighting anomalies such as swallowed exceptions, hardcoded environment URLs, or incomplete Jakarta namespace updates so senior architects can focus their review time on high-risk business logic.
Where Human Experts Must Still Make the Call
While AI coding agents substantially reduce repetitive developer effort, they cannot own architectural accountability. In real-world enterprise upgrades, experienced Liferay architects remain essential for four critical decisions:
- Retiring custom code in favor of standard features: Legacy Liferay 7.x portals often contain custom portlets built to fill gaps that modern Liferay DXP now solves out of the box through Liferay Objects, Client Extensions, or the headless Liferay CMS. An AI agent will faithfully upgrade old Java code unless an architect steps in and decides to retire that technical debt altogether.
- Navigating third-party library compatibility: Moving to Jakarta EE 10 often reveals external dependencies that no longer receive updates. Choosing between upgrading a library, replacing it with an alternative, or isolating it requires architectural judgment and security review.
- Data, content, and permission governance: Automated code tools do not validate whether custom database tables, legacy Web Content structures, or complex role permissions align with your future operating model.
- Realistic timeline and risk management: AI accelerates code remediation and test drafting, but end-to-end integration testing, performance benchmarking, and cutover rehearsal still require disciplined human project management.
Inside an Anonymised Enterprise Upgrade: How the Hybrid Workflow Plays Out
Consider a recent upgrade engagement for a mid-sized financial services portal running on Liferay 7.2 with 38 custom OSGi modules, custom service builders, and multiple external CRM integrations. The IT leadership team needed to move onto a modern LTS baseline with clear long-term support through 2029, without halting ongoing feature delivery for three months.
Rather than running a purely manual code remediation sprint, the delivery team structured the upgrade in controlled waves:
- Baseline automation: Engineers ran upgradeSourceCode and upgradeJakarta across the Liferay Workspace, automatically resolving a large share of the mechanical API and javax-to-jakarta changes.
- AI-assisted error triage: For the remaining compilation errors and deprecated service calls, developers used an AI coding agent constrained by strict workspace rules to explain each breaking change, draft fixes, and generate unit tests for core account-lookup modules.
- Architectural pruning: During diff review, lead architects identified six legacy custom modules that replicated capabilities now native to Liferay DXP. Instead of spending time fixing them, the team retired those modules completely.
By pairing Liferay's native upgrade tasks with AI-assisted remediation and senior architectural oversight, the team cut initial code remediation effort noticeably compared to prior manual upgrades—while keeping every single commit reviewed, tested, and approved by certified Liferay engineers. If you are evaluating how to modernize your environment, explore our Liferay Upgrade Services for structured assessment frameworks.
Conclusion
Upgrading from Liferay 7.x does not have to be an unpredictable drain on your engineering team. By combining Liferay's trusted upgradeSourceCode and upgradeJakarta tasks with governed AI coding agents and senior architectural review, IT managers can resolve breaking changes faster, retire unnecessary custom code, and move confidently onto Liferay DXP 2026.Q1.
At Surekha Technologies, an official ISO-certified Liferay Partner with over 15 years of experience and 300+ enterprise deployments, our certified Liferay architects help organizations assess upgrade complexity, modernize custom codebases safely, and deliver smooth transitions with full post-launch support. Learn more about our Liferay Development Services or schedule a Liferay Upgrade Assessment with our engineering leads today.
Frequently Asked Questions
How long does a Liferay upgrade take?
A typical Liferay upgrade takes anywhere from 8 to 20 weeks depending on your starting Liferay 7.x version, the number of custom modules, third-party integrations, and whether you are also modernizing legacy Web Content or themes. Pairing Liferay's native upgrade tools with AI coding agents typically shortens the code remediation and testing phases, though thorough UAT and cutover planning remain essential.
What is the Jakarta change in Liferay?
Starting with Liferay DXP 2025.Q3, Liferay moved from Java EE 8 to Jakarta EE 10. This change requires updating Java package imports, configuration files, and dependencies from the legacy javax namespace to jakarta. Liferay provides the Blade upgradeJakarta task to automate most of this transition across your Liferay Workspace.
Can AI upgrade Liferay code on its own?
No. AI coding agents cannot safely upgrade a Liferay environment autonomously. The most reliable approach runs Liferay's deterministic upgradeSourceCode and upgradeJakarta tools first, uses AI to help resolve remaining compile errors, write tests, and review diffs, and relies on experienced Liferay architects to make architectural decisions and approve every production change.
Which Liferay version should teams upgrade to right now?
For most enterprises prioritizing stability and predictable maintenance, Liferay DXP 2026.Q1 is the current Long-Term Support (LTS) release, backed by premium support through March 2029. Upgrading onto an LTS release gives IT managers a multi-year window of security updates and platform reliability.