Transform Maven Projects or Files From Java EE 8 to Jakarta EE 10
Using the Payara Tools plugin
, you can transform whole projects or single files from Java EE 8 to Jakarta EE 10.
Refactor a Java EE 8 Project to Jakarta EE 10
To refactor a Java EE 8 based Maven project right click on root project folder and choose Payara Refactor→Transform to Jakarta EE 10:
![Refactor Project](../../../../_images/eclipse-plugin/transform-to-jakarta/root-folder-Jakarta-EE-10.png)
The plugin will open a dialog to choose the destination folder where the new project will be created:
![Choose Project Destination Folder](../../../../_images/eclipse-plugin/transform-to-jakarta/choose-new-project-dest-folder.png)
After choosing the Destination Directory
, a confirmation message will appear indicating that the project was generated.
![Confirmation Folder](../../../../_images/eclipse-plugin/transform-to-jakarta/confirmation-folder.png)
You can see the output of the generation process in the Eclipse console. |
The Maven plugin that executes the transformation process will print its output to the IDE’s console:
![mvn package Folder](../../../../_images/eclipse-plugin/transform-to-jakarta/mvn-package-folder.png)
A maven BUILD SUCCESS
message should be logged in the IDE’s console.
![Build Success](../../../../_images/eclipse-plugin/transform-to-jakarta/build-success.png)
When the whole project is transformed, the plugin adds JakartaEE10 at the end of the project name. In our example, demo-JakartaEE10 project was created from demo project.
|
Transform a Single File
To refactor a Java EE 8 file
right click on it and choose Payara Refactor→Transform to Jakarta EE 10 option:
![Refactor File](../../../../_images/eclipse-plugin/transform-to-jakarta/file-to-Jakarta-EE-10.png)
The plugin will open a dialog to choose the destination package where the new file will be created:
![Choose File Destination Folder](../../../../_images/eclipse-plugin/transform-to-jakarta/choose-new-file-dest-folder.png)
After choosing the Destination Package
, a confirmation message will appear indicating that the file was generated.
![Confirmation File](../../../../_images/eclipse-plugin/transform-to-jakarta/confirmation-file.png)
You can see the output of the generation process in the Eclipse console. |
The output of the Maven plugin that executes the transformation code can be reviewed in the IDE’s console:
![mvn package File](../../../../_images/eclipse-plugin/transform-to-jakarta/mvn-package-file.png)
A BUILD SUCCESS
message from the Maven plugin will be logged in the IDE’s console.
![Finisehd Message](../../../../_images/eclipse-plugin/transform-to-jakarta/finish-file.png)
The new file will be located in the chosen destination package.
![File Created](../../../../_images/eclipse-plugin/transform-to-jakarta/file-created.png)
When a single file is transformed, a jakartaee10 package containing the new file will be created in the destination package.
|