Payara Platform

Payara Server Maven Plugin Tools in IntelliJ IDEA

Using the Payara Tools and Payara Server Maven Plugin, you can integrate Payara Server within the IntelliJ IDEA to streamline development workflows. This integration allows you to:

  • Start and stop the Payara Server from within the IDE

  • Define the Java runtime to be used by Payara Server

  • Deploy an application from within the IDE

  • Configure pre-launch Maven tasks for automatic build and deployment

Managing Payara Server using Maven Plugin from IntelliJ IDEA

  1. To manage Payara Server using the Maven plugin from IntelliJ IDEA, first create the new Payara Server configuration by selecting the Edit Configuration option: image::intellij-plugin/payara-server-maven-plugin/create-configuration.png[Create Configuration]

  2. In the Run/Debug Configurations dialog, click +, select the Payara Server: image::intellij-plugin/payara-server-maven-plugin/create-server-configuration.png[Create Server configuration]

  3. In the newly created configuration:

    1. Set the goal to dev to deploy the application in development mode using the Payara Server Maven Plugin or start to start the server without dev mode.

    2. Specify the JDK or JRE path that Payara Server should use.

  4. Optionally, configure the application’s context path or deployment format (e.g., exploded). image::intellij-plugin/payara-server-maven-plugin/app-configuration.png[App configuration]

  5. To add the Payara Server to the configuration, click the Payara Server Settings > Payara Home and set it to the Payara Server’s installation path you would like to add to the IDE. image::intellij-plugin/payara-server-maven-plugin/payara-configuration.png[Payara configuration]

  6. Configure environment variables and system properties required by the server and Maven plugin. image::intellij-plugin/payara-server-maven-plugin/env-server-properties.png[Env and Server properties]

  7. Define additional Maven properties used by the Payara Server Maven Plugin during the build and deployment process. image::intellij-plugin/payara-server-maven-plugin/maven-properties.png[Maven properties]

  8. Specify Maven tasks to run before launching the server. image::intellij-plugin/payara-server-maven-plugin/before-launch-task.png[Before Launch Task]

  9. Click the Run or Debug button from top-right panel to start Payara Server, or start Payara Server in debug mode, which would allow you to debug deployed applications image::intellij-plugin/payara-server-maven-plugin/run-server.png[Start the Payara Server]

  10. You can see the server log in the application build console window. image::intellij-plugin/payara-server-maven-plugin/server-log.png[Payara Server log]

  11. After application deployed to the Payara Server, IntelliJ starts a web browser and opens the application context root in the web browser.

Back to Top