This page provides instructions on how to build the Payara Server’s source code.


To build and run Payara Server, your environment must be set up with the following:

  • Oracle JDK 7 Update 65 or later, or Oracle JDK 8 Update 20 or later.

  • Maven 3.3.9 or above

  • Git

  • A JAVA_HOME environment variable pointing to the JDK install location (e.g. /home/user/jdk11.8.0_45/)

  • A PATH environment variable that has a pointer to the Java binaries (JAVA_HOME/bin)

You can also optionally add the Maven bin folder to the PATH environment variable as well, and the documentation will assume that you have done so.

Configuring Maven

If using JDK 7, you will need to increase the heap size and PermGen size to prevent the build process from running out of memory.

Create a MAVEN_OPTS environment variable and set it as:

-Xmx1024m -XX:MaxPermSize=512m

If using JDK 8, PermGen has been replaced by Metaspace, which can increase its maximum size on its own, so you only need to increase the heap size:


Getting the Source Code

To download the Payara Server’s source code, open a terminal or Git Bash window, navigate to the directory you would like the source code to be downloaded to, and run git clone https://github.com/payara/Payara.git.

This will download the Payara Server’s source code, and initialize git, in a directory called Payara.

Building Payara Server

With your Git Bash or terminal window, navigate into the downloaded Payara directory, and run:

mvn clean install

This will build Payara and run the integrated GlassFish unit tests. To save a bit of time, you can skip these tests by appending the skipTests flag to the install command like so:

mvn clean install -DskipTests

Building Payara Micro

Since release 164, Payara Micro is included as part of the default build. As it depends on modules of Payara Server, it can’t be built on its own. To build Payara Micro:

mvn clean install -DskipTests

After the build has completed, the Payara Micro jar can be found in the target directory at:


Building Payara Microprofile

Payara Microprofile is built as part of Payara Micro. To build Payara Microprofile, you can run:

mvn clean install -DskipTests

Payara Microprofile can be found in its target directory at:


Additional Build Profiles

There are a number of additional Maven build profiles:

mvn clean install
mvn clean install -PBuildExtras
mvn clean install -PQuickBuild
Payara Version clean install -PBuildExtras -PQuickBuild

Payara Server

Payara Server (Web Profile)

Payara Server Multi Language

Payara Server Multi Language (Web Profile)

Payara Server Minimal

Payara Micro

Payara Microprofile

Payara Embedded

Payara Embedded (Web Profile)

To save time on builds, you can also add the flag skipTests:

mvn clean install -DskipTests

This will cut out all build tests so will save quite a bit of time.

results matching ""

    No results matching ""