Payara Micro NetBeans Plugin

Netbeans has Payara Micro support built into the IDE, so there is no need to install a plugin to integrate and control Payara Micro from Netbeans.

Creating a Payara Micro project

Apache Netbeans IDE supports Payara Micro out of the box. To create a Payara Micro project, follow these steps:

  1. Create a new project using Payara Micro Application archetype under Java with Maven category.

    netbeans new project payara6
  2. Input the desired project name, project name, artifact id, group id and version.

    netbeans new application payara6
  3. Select the desired Payara Micro version. Make sure that Auto Bind HTTP is left unchecked.

    netbeans new application version payara6

The template as of Netbeans 17 is based on outdated Payara Micro version and requires the follwing modifications to work with Payara 6:

  1. Change the Jakarta EE version to 10:

    <version.javaee>7.0</version.javaee>
    to
    <version.jakartaee>10.0.0</version.jakartaee>
  2. Change the javaee-web-api dependency to jakartaee-web-api:

    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-web-api</artifactId>
        <version>${version.javaee}</version>
        <scope>provided</scope>
    </dependency>
    to
    <dependency>
        <groupId>jakarta.platform</groupId>
        <artifactId>jakarta.jakartaee-web-apii</artifactId>
        <version>${version.jakartaee}</version>
        <scope>provided</scope>
    </dependency>
  3. Change the source and target version of Java to 11:

    <source>1.8</source>
    <target>1.8</target>
    to
    <source>11</source>
    <target>11</target>
  4. Remove the following option from the command line options of payara-micro-maven-plugin

    <option>
        <key>--autoBindHttp</key>
        <value>true</value>
    </option>

Deploying the Payara Micro project

To deploy the Payara Micro project, simply run the application using the Run Project option from the Run menu. The Payara Micro application will be deployed and the URL will be displayed in the Output window.

netbeans app running payara6