You are here

GitHub


As with many open source projects, Payara is hosted on GitHub, allowing anyone to contribute code and help with its development. To make sure that development is coordinated and that changes are easily tracked, we have a series of steps that should be followed in order to get your code merged.
 

Getting Payara Server
 

You will need to create a personal GitHub account and fork the repository. Once you have your own up-to-date version of Payara Server, you can now download it to your computer.

Install git on your local environment and use the below command to download your remote copy of Payara Server:

git clone https://github.com/<YourUsername>/Payara

Git works using "repositories" - stores of data. By default, you have your remote repository on Github, as well as your local repository on your computer. To ensure that future versions of Payara Server incorporate everyones changes, in addition to the current branch there is an upstream branch, where merged changes can be stationed before being added to the project. Adding your own remote repository as the default ("origin") and the upstream Payara repository will ensure that you are always able to synchronise yourself with the project as it goes forward. Run the following two commands:

git remote add upstream https://github.com/payara/Payara
git remote add origin https://github.com/<YourUsername>/Payara

You are now free to start working on Payara Server issues, adding new features, or tinkering with the codebase.
 

Building Payara Server
 

Payara Server uses Maven to build the server, you can use either JDK 7 or JDK 8 to build Payara Server, we distribute Payara Server built with JDK7 for backwards compatibility with GlassFish. To build Payara Server from the root of the cloned source code tree execute;

mvn -DskipTests clean package

When finished the Payara Server distribution zip file will be available in the directory;

appserver/distributions/payara/target/payara.zip
 

Updating your fork
 

As Payara Server is under continuous development, our upstream branch is regularly updated with dev and community commits. It is worth synchronising your repository with the upstream repo you added previously.

To get the latest updates from upstream and merge them into your local repo, enter the following command:

git fetch upstream

Then ensure that you are on your local master branch (as opposed to any issue branches you may have):

git checkout master

Finally, pull in the changes from upstream to your master and update your remote repository:

git pull upstream master
git push origin master


 

Working on an issue
 

To start working on an issue, create a new branch on your GitHub repo with the following command:

git checkout -b <BranchName>

Please don't prepend PAYARA to your branch unless you have been given a JIRA ticket to work on

If you are working on a GitHub issue a good name for your branch could be issue-### where ### is the number.

Start working on your project within your IDE and make any changes you wish.
 

Debugging Payara Server
 

Once you have built Payara Server the full distribution will be available within your local repository under the path

<YourLocalRepo>/appserver/distributions/payara/target/stage

In order to debug Payara Server, first build the server with your changes. Run it in debug mode by using the following command:

./asadmin start-domain --verbose --debug

From within your IDE you can then attach a debugger to the default port of 9009.

Pushing issues to GitHub
 

When you are finished working on your issue, add the files to your git with a comment describing the addressed issue via JIRA and/or the GitHub issue number:

git add . [or specify specific files
git commit -m "fixes #<GithubNumber>"

Before you merge the branch, ensure that you have updated your master to match the upstream Payara Server. This can be accomplished by using the following:

First, switch to the master branch:

git checkout master

Then synchronise your branch with the changes from master:

git pull upstream master

Flip back to your own branch, with your changes:

git checkout <YourBranchName>

Merge said changes with the master branch by rebasing your code (effectively a neater marge for private repos):

git rebase master

Finally, push the changes from your branch to a new branch on the main repo (origin), with the same name (so as to preserve the issue numbers and history):

git push origin <YourBranchName>:<YourBranchName>

Feature requests and issues
 

A large portion of our work is prompted by the actions of the community. If you have an issue which you have found with Payara Server, or a feature which you would like to be implemented we welcome the raising of GitHub issues.
 

Reporting bugs
 

If you find a bug within Payara Server, please post it as a GitHub issue. GitHub is our main repository for community found issues with Payara Server and our support team frequently monitor it for new issues. As with submitting issues, a concise title which clearly explains the issue combined with a comment explaining what the found issue is and either how it arose and a stacktrace of the issue, or a test case which is able to reproduce the issue will help us deliver a patch.
 

Responses
 

We continually check the GitHub posted issues for bugs, feature requests, and assorted issues. If you have posted an issue, chances are it has been read by a member of staff. Requests for further information and labels are often posted in order to make it easier for the dev team to see issues. However if your issue has not received a comment or label, don't take this as it having not been read or acted upon!
 


Latest news from Payara Foundation

Payara Server 173 is out

Aug 16, 2017

Payara Server and Payara Micro 4.1.2.173 are now available for download! With 58 bug fixes, 30 improvements, 2 security fixes and 5 component upgrades...

Read more »

Payara Server 172 is out!

May 22, 2017

Focusing on enhancing Payara Server and Payara Micro's ease-of-use in cloud environments, we've brought in new features to make working with Docker mo...

Read more »

Payara Server 171.1 Patch Release is out!

Mar 28, 2017

14 new bug fixes, 2 improvements and 1 security fix have been added to the new patch release of Payara Server and Payara Micro. See the Release Notes...

Read more »