Payara Micro Tools in Eclipse IDE

Using the Payara Tools Eclipse plugin, you can integrate Payara Server within the Eclipse IDE and perform the following tasks:

  • Run Payara Micro from within the IDE

  • Control Payara Micro properties from within the IDE

  • Deploy applications to Payara Micro within the IDE

  • Auto Publish & Hot Deploy your application

Creating A New Payara Micro Maven Application

  1. Simply start up Eclipse IDE and then Choose File > New > Project from the main menu or press Ctrl+N to get the list of available projects:

    Generate Payara Micro Application
  2. Now, select the Payara Micro Project type to create the application:

    Payara Micro Project
  3. Select the destination folder, where the project will be generated. You may also use the default workspace location:

    Project location
  4. Enter the groupId, artifactId, etc to set up the project, and then click Next:

    Enter GAV
  5. Enter the Payara Micro application settings e.g context path of the application and Payara Micro version and click the Finish button:

    Micro settings
  6. The IDE creates the Payara Micro application using the Payara Micro maven archetype. As you can see, the project has a basic structure with src\main\java and src\main\webapp folders:

    Micro project generated

Running The Payara Micro Application

Eclipse IDE needs a run configuration to build the artifacts and run/debug the Payara Micro application.

  1. To create the Payara Micro Run configuration, select the Run > Run Configurations…​ from the main menu or toolbar:

    Micro run configuration
  2. The Payara Micro Run configuration dialog allows you to specify Payara Micro settings and environment variables.

    Payara Micro setting specified by payara-micro-maven-plugin in the pom.xml takes precedence over the Run Configuration.
  3. Select Payara Micro and double click it or click on the New configuration button to create a new configuration :

    New run configuration
  4. Associate the workspace project with the run configuration:

    Associate project
  5. Click the browse button and select the project from the Project Selection dialog:

    Select the project
  6. Enter the configuration name and choose the Build Artifact type

    Add the Run and Debug configuration
  7. Add the configuration to Run and Debug menu and press the Apply button to save the configuration:

    Add the Run and Debug configuration
  8. To start the Payara Micro instance, run the Payara Micro Sample configuration from the toolbar or main menu:

    Invoke run configuration
  9. After running the Micro application, you may see the log in the OUTPUT window:

    Payara Micro log
    Payara Micro log

Similarly, to debug the Payara Micro application and attach the debugger to the application, instead of pressing the Run button, you can instead click Debug from similar locations and select the Payara Micro Sample configuration.