Visit Azul.com Support

Getting Started

Obtaining the Tool

The tool is a single jar that you can run in four ways:

Way Best for How to start

Maven plugin

Maven projects, scripts and CI

mvn fish.payara.tools:payara-platform-migration-tool:<version>:migrate

Java jar

Gradle, Ant or any project without a pom.xml, and CI

java -jar payara-platform-migration-tool-<version>.jar migrate

Web UI

Choosing settings in your browser and watching live progress

mvn fish.payara.tools:payara-platform-migration-tool:<version>:start or java -jar payara-platform-migration-tool-<version>.jar start

Claude Code (MCP)

Letting Claude Code read the findings and make the edits

See Using the Tool from Claude Code

All four ways use the same advisors and the same settings.

Tip
To use a shorter Maven command, add fish.payara.tools to pluginGroups in your Maven settings.xml. Then mvn payara-platform-migration-tool:start works without the group id and version.

Start with the Web UI

Go to the root of your project and start the settings page. It runs on your machine only.

 
mvn fish.payara.tools:payara-platform-migration-tool:<version>:start

Your browser opens a page where you choose:

  1. Project: the folder to migrate, the Jakarta EE version (10 or 11) and the Payara version. Leave the version fields empty to detect them.

  2. What to run:

    • Detection only: shows which technologies your project uses and changes nothing.

    • Advisors + recipes (default): scans, then applies the automatic fixes. No AI is used and no tokens are spent.

    • AI agent: does the above, then lets an AI agent work through the findings that need judgement.

  3. The advisors to run, and optionally the file types to scan.

Click Start to see live progress. The page also shows the command it runs, which you can copy to use in scripts or CI.

Analyze Your Project (No AI)

Go to the root of your project and run:

 
mvn fish.payara.tools:payara-platform-migration-tool:<version>:migrate \ -Dmigration.dir=. \ -Dmigration.advisor=true

This runs the advisors, applies the automatic fixes (recipes) and writes a report. To only report what would change without editing any file, add -Dmigration.apply=false. To only detect which technologies your project uses, use -Dmigration.detection=true.

Upgrade Your Project with the AI Agent

  1. Commit your project to version control, or work on a branch, so you can review and revert the changes. By default the tool also commits after each step, which requires a clean git repository.

  2. Configure your LLM provider. For example, with environment variables:

     
    export PAYARA_AI_PROVIDER=OPEN_AI export PAYARA_AI_API_KEY=<your API key>

    See Supported Providers for the values.

  3. Run the migration with the agent enabled:

     
    mvn fish.payara.tools:payara-platform-migration-tool:<version>:migrate \ -Dmigration.dir=. \ -Dmigration.advisor=true \ -Dmigration.agent=true
  4. Review the changes and the report, and run your own tests.

By default, the tool upgrades to Jakarta EE 11. To upgrade to Jakarta EE 10, add -Dmigration.target=10.

Warning
With the agent enabled, the tool modifies your source files and sends source code to your configured LLM provider.

Using the jar without Maven

The jar has the same commands as the Maven goals: start, migrate, view and help. Settings are passed as --migration.<name>=<value> instead of -Dmigration.<name>=<value>. A command is always required.

 
java -jar payara-platform-migration-tool-<version>.jar migrate \ --migration.dir=/path/to/your-app \ --migration.advisor=true

The AI provider settings are not migration.* settings. With the jar, set them as environment variables, or as -D properties placed before -jar.

Supported Providers

Provider Value of PAYARA_AI_PROVIDER Notes

Claude Code CLI

CLAUDE_CODE_CLI

No key needed. Uses your logged-in claude. The model is not fixed: set PAYARA_AI_MODEL to an alias such as haiku, sonnet or opus, for example -DPAYARA_AI_PROVIDER=CLAUDE_CODE_CLI -DPAYARA_AI_MODEL=sonnet. Token usage is reported per round and batch in the report.

Anthropic (Claude)

ANTHROPIC

Needs PAYARA_AI_API_KEY.

OpenAI

OPEN_AI

Needs PAYARA_AI_API_KEY.

Google (Gemini)

GOOGLE

Needs PAYARA_AI_API_KEY.

Mistral

MISTRAL

Needs PAYARA_AI_API_KEY.

Ollama (local)

OLLAMA

No key. Set PAYARA_AI_PROVIDER_LOCATION to the server URL.

Custom OpenAI-compatible endpoint

CUSTOM_OPEN_AI

Needs PAYARA_AI_API_KEY and PAYARA_AI_PROVIDER_LOCATION.

These variables configure the provider. With Maven, set them as environment variables or as -D flags.

Variable Default Meaning

PAYARA_AI_PROVIDER

none

The provider to use. Required when the agent is on.

PAYARA_AI_MODEL

the provider’s default

Model name, for example haiku or gpt-4o.

PAYARA_AI_API_KEY

none

API key. Not needed for CLAUDE_CODE_CLI or OLLAMA.

PAYARA_AI_PROVIDER_LOCATION

none

Base URL. Required for OLLAMA and CUSTOM_OPEN_AI.

PAYARA_AI_TIMEOUT

600

Seconds to wait for one request.

PAYARA_AI_TEMPERATURE

the model’s default

Sampling temperature.

PAYARA_AI_MAX_TOKENS

the model’s default

Most output tokens per request.

PAYARA_AI_LOG_REQUESTS

false

Log every prompt sent to the model.

PAYARA_AI_LOG_RESPONSES

false

Log every answer received.

For guidance on which provider and model to use, see Choosing an LLM.

Interactive Mode

To review each file change before it is written, enable interactive mode. The tool asks for a yes or no in the terminal before the agent writes a file. This needs an interactive terminal.

 
mvn fish.payara.tools:payara-platform-migration-tool:<version>:migrate \ -Dmigration.advisor=true -Dmigration.agent=true \ -Dmigration.agent.interactive=true

Using the Tool from Claude Code

The jar can also run as an MCP server. Claude Code can then ask the tool what your project needs, run the automatic recipes, apply the recommended fixes with its own tools, and check that the project still builds. No AI provider settings are needed, because Claude Code does the AI work.

Go to your project and add the server:

 
cd /path/to/your-app claude mcp add payara-platform-migration-tool -- java -jar /path/to/payara-platform-migration-tool-<version>.jar mcp

To add it for every project, add --scope user. To let it work only inside certain folders, add --allowed-roots=/path/one,/path/two after mcp.

Start Claude Code after adding the server, and type /mcp to check that it shows as connected. A session that is already running does not pick up a new server.

Then ask Claude Code, in this order:

  1. Check what is there: "Use the payara-platform-migration-tool tools to detect what this project contains, then scan it and summarise the findings."

  2. Do the migration: "Use the migrate_project prompt from payara-platform-migration-tool for this project. Run the recipes first and show me the preview before you apply it, then rescan and compile to confirm."

  3. Check the result: "Rescan and tell me how many findings are fixed, how many are new and how many remain. Then compile the project."

Claude Code asks your permission before it calls the tools that change files (run_recipes, apply_guided_recipes) or run your build (compile, test). The server does not make git commits, so commit or branch first and review the result with git diff.

Tip
The first scan of a large project can take a few minutes. Raise Claude Code’s tool timeout for it (MCP_TOOL_TIMEOUT).

Gradle and Other Projects

The tool compiles your project with its own build tool: Maven (using mvnw if present), Gradle or Ant. Run it as the jar, which does not need a pom.xml. Dependency changes are written for Maven pom.xml files only. For Gradle projects, source and descriptor findings are handled, but dependency changes are partly manual.

For Gradle and Ant projects, use the standalone jar command:

 
java -jar payara-platform-migration-tool-<version>.jar migrate \ --migration.dir=/path/to/your-app \ --migration.advisor=true

Stopping a Run

Use the Stop button on the live report page. The run ends at the next safe point, never in the middle of an edit, and every change made so far stays on disk. The report is written and marked STOPPED. A stop is not a failed build: the Maven goal ends with a warning and the jar exits with code 130.

Parameter Reference

The same migration.* settings work in both forms. Maven takes them as -Dmigration.dir=…​, the jar as --migration.dir=…​. A jar flag without a value means true. Run the help goal (or java -jar …​ help) to print the same list from the tool.

Table 1. Project
Setting Values Default Meaning

migration.dir

folder

the folder you run in

Root of the project to migrate.

migration.target

10, 11

11

Jakarta EE version to migrate to.

migration.targetPayara

6, 7

derived from the Jakarta EE target

Payara major version to migrate to.

migration.apply

true, false

true

false is a dry run: plan and report only, no file is edited.

Table 2. What to run (if you pick none, advisors and recipes run)
Setting Values Default Meaning

migration.detection

true, false

false

Report which advisors apply, then stop. Cannot be combined with the next two.

migration.advisor

true, false

false

Run the advisors, build the plan and apply the recipes.

migration.agent

true, false

false

Also run the AI agent on the findings the recipes cannot fix. Uses an AI provider and costs tokens.

Table 3. Advisors and files
Setting Values Default Meaning

migration.advisorTypes

comma list

all

Only run these advisors, for example JCache.

migration.includeExtensions

comma list

all files

Only scan these file types, for example java,xml. Wins over the exclude list.

migration.excludeExtensions

comma list

none

Skip these file types. Ignored when an include list is set.

Table 4. AI agent (only used when migration.agent=true)
Setting Values Default Meaning

migration.maxRounds

number, at least 1

5

How many times the agent re-scans and retries unresolved findings.

migration.compilerFixRounds

number, at least 0

5

Extra rounds to fix compile errors left after the agent rounds.

migration.resolveInfo

true, false

true

The agent also acts on informational findings. false lets it skip them.

migration.agent.batchSize

number, at least 1

25

Most files in one prompt.

migration.agent.maxBatchesPerRound

number, at least 0

0 (no limit)

Stop a round after this many batches. 2 is useful for a cheap trial.

migration.advisorReport

file

none

An existing migration-plan.md for the agent to use instead of scanning again.

migration.agent.interactive

true, false

false

Ask yes or no in the terminal before the agent writes a file.

Table 5. Output
Setting Values Default Meaning

migration.liveReport

true, false

true

Open the live-updating report in your browser during the run.

migration.gitCommit

true, false

true

Commit after each recipe pass and each agent round. Needs a clean git repository (no staged or unstaged changes).

migration.persistReport

true, false

true

Also copy the final report to .migration/latest/.

migration.timingLog

true, false

false

Add timing lines to the log.