Checking Out the Jersey Sources

Checking out Jersey 2.x sources

Jersey 2.x is based on a completely new code base that has been completely revamped. As part of this effort, Jersey has moved from SVN to modern, distributed GIT version control system. This allowed us to how the project sources on GitHub. The repository can be cloned in a read-only mode by invoking:

git clone ssh://git@github.com:jersey/jersey.git

If you’re only interested in reading the latest version of the sources and do not wish to a) contribute code back to the repository or b) do not care about the history, you can speed up the clone process by invoking:

git clone --depth 1 ssh://git@github.com:jersey/jersey.git

instead. This may speed up the clone process considerably.

Checking out Jersey 1.x sources

Old Jersey 1.x source code is hosted on [GitHub][jersey1gh] too. Read-only copy can be obtained by executing:

git clone ssh://git@github.com:jersey/jersey-1.x.git

Jersey 1.x code base has been frozen in terms of new features. Only bug fixes and other sustaining patches are currently accepted in Jersey 1.x source code repository.

Understanding Jersey 2.x Branches and Tags

Tag & Branch information:

Tag/Branch Name Details
master This is effectively Jersey 2.x development branch. Development of new features happens here.
2.25 This is the Jersey 2.25 release tag. A sustaining branch for Jersey 2.25 release will be created from the tag if necessary.
2.24.1 This is the Jersey 2.24.1 release tag. A sustaining branch for Jersey 2.24.1 release will be created from the tag if necessary.
2.24 This is the Jersey 2.24 release tag. A sustaining branch for Jersey 2.24 release will be created from the tag if necessary.
2.23.2 This is the Jersey 2.23.2 release tag. A sustaining branch for Jersey 2.23.2 release will be created from the tag if necessary.
2.23.1 This is the Jersey 2.23.1 release tag. A sustaining branch for Jersey 2.23.1 release will be created from the tag if necessary.
2.23 This is the Jersey 2.23 release tag. A sustaining branch for Jersey 2.23 release will be created from the tag if necessary.
2.22.2 This is the Jersey 2.22.2 release tag. A sustaining branch for Jersey 2.22.r21 release will be created from the tag if necessary.
2.22.1 This is the Jersey 2.22.1 release tag. A sustaining branch for Jersey 2.22.1 release will be created from the tag if necessary.
2.22 This is the Jersey 2.22 release tag. A sustaining branch for Jersey 2.22 release will be created from the tag if necessary.
2.21.1 This is the Jersey 2.21.1 release tag. A sustaining branch for Jersey 2.21.1 release will be created from the tag if necessary.
2.21 This is the Jersey 2.21 release tag. A sustaining branch for Jersey 2.21 release will be created from the tag if necessary.
2.20 This is the Jersey 2.20 release tag. A sustaining branch for Jersey 2.20 release will be created from the tag if necessary.
2.19 This is the Jersey 2.19 release tag. A sustaining branch for Jersey 2.19 release will be created from the tag if necessary.
2.18 This is the Jersey 2.18 release tag. A sustaining branch for Jersey 2.18 release will be created from the tag if necessary.
2.17 This is the Jersey 2.17 release tag. A sustaining branch for Jersey 2.17 release will be created from the tag if necessary.
2.16 This is the Jersey 2.16 release tag. A sustaining branch for Jersey 2.16 release will be created from the tag if necessary.
2.15 This is the Jersey 2.15 release tag. A sustaining branch for Jersey 2.15 release will be created from the tag if necessary.
2.14 This is the Jersey 2.14 release tag. A sustaining branch for Jersey 2.14 release will be created from the tag if necessary.
2.13 This is the Jersey 2.13 release tag. A sustaining branch for Jersey 2.13 release will be created from the tag if necessary.
2.12 This is the Jersey 2.12 release tag. A sustaining branch for Jersey 2.12 release will be created from the tag if necessary.
2.11 This is the Jersey 2.11 release tag. A sustaining branch for Jersey 2.11 release will be created from the tag if necessary.
2.10.1 This is the Jersey 2.10.1 release tag. A sustaining branch for Jersey 2.10.1 release will be created from the tag if necessary.
2.10 This is the Jersey 2.10 release tag. A sustaining branch for Jersey 2.10 release will be created from the tag if necessary.
2.9.1 This is the Jersey 2.9.1 release tag. A sustaining branch for Jersey 2.9.1 release will be created from the tag if necessary.
2.9 This is the Jersey 2.9 release tag. A sustaining branch for Jersey 2.9 release will be created from the tag if necessary.
2.8 This is the Jersey 2.8 release tag. A sustaining branch for Jersey 2.8 release will be created from the tag if necessary.
2.7 This is the Jersey 2.7 release tag. A sustaining branch for Jersey 2.7 release will be created from the tag if necessary.
2.6 This is the Jersey 2.6 release tag. A sustaining branch for Jersey 2.6 release will be created from the tag if necessary.
2.5.1 This is the Jersey 2.5.1 release tag. A sustaining branch for Jersey 2.5.1 release will be created from the tag if necessary.
2.5 This is the Jersey 2.5 release tag. A sustaining branch for Jersey 2.5 release will be created from the tag if necessary.
2.4.1 This is the Jersey 2.4.1 release tag. A sustaining branch for Jersey 2.4.1 release will be created from the tag if necessary.
2.4 This is the Jersey 2.4 release tag. A sustaining branch for Jersey 2.4 release will be created from the tag if necessary.
2.3.1 This is the Jersey 2.3.1 release tag. A sustaining branch for Jersey 2.3.1 release will be created from the tag if necessary.
2.3 This is the Jersey 2.3 release tag. A sustaining branch for Jersey 2.3 release will be created from the tag if necessary.
2.2 This is the Jersey 2.2 release tag. A sustaining branch for Jersey 2.2 release will be created from the tag if necessary.
2.1 This is the Jersey 2.1 release tag. A sustaining branch for Jersey 2.1 release will be created from the tag if necessary.
2.0.1 This is the Jersey 2.0.1 release tag. A sustaining branch for Jersey 2.0.1 release will be created from the tag if necessary.
2.0 This is the Jersey 2.0 release tag. A sustaining branch for Jersey 2.0 release will be created from the tag if necessary.

In order to check out a branch in git, you simply need to issue git checkout <branch name> (e.g. git checkout master).

If you’re interested in working with an existing tag, you’ll first need to issue git fetch --tags in order to obtain the tag references. After successful completion of this command, you can issue git checkout <tag name>. Note that when doing so, you’ll get a message about being in a detached state - this is normal and nothing to worry about. All fetched tags can be listed using git tag -l In general, we keep our tag names inline with the released version. For example, if you wanted to checkout the tag for Jersey 2.0, the tag name would be 2.0 This convention is consistent for all branches/versions/releases.

Submitting Patches and Contribute Code

Contributing to Jersey project can be done in various ways: bug fixes, enhancements, new features, or even whole new extension modules. In general, all contributions must comply with following requirements:

  • All contributors must sign the Oracle Contributor Agreement.

  • Any new contribution must be associated with an existing Jersey issue. If no existing issue has been yet opened for the problem your contribution attempts to solve, please open a new one.

  • All bug fixes must be accompanied with a new unit test (or a set of unit tests) that reproduce the fixed issue.

  • New large feature contributions must be accompanied with:

    • A patch for Jersey User Guide that is written in DocBook 5. Either a new chapter or a new section to existing chapter must be provided as appropriate.
    • At least one new example demonstrating the feature.

For small patches (minor bug fixes, correction of typos in documentation etc.), linking a gist that contains your patch with details on what you're resolving and how you've resolved it is most convenient approach. Alternatively, especially in case of larger contributions or more significant changes in code, please follow the process of opening a new GitHub pull request.

GIT Tips and Tricks for Developers

First, for anyone not familiar with Git, before attempting to work with the repository, we highly recommend reading the Git tutorial.

When collaborating, before you push your changes to the remote repository, it’s best to issue git pull --rebase This will ‘replay’ any changes that have occurred in the remote repository since your last pull on top of your current work. If you don’t do this, Git will perform a merge for you, however, the result of the commit will look like you’ve touched files that you haven’t. This is fine, but it generally raises a few eyebrows and makes code reviews of any patches slightly more complicated. As usual, more complications means more time spent in review.

There are times when you may need to move changes back and forth between branches. In cases where the code bases are very similar, you can use git cherry-pick <SHA1 of the commit to pick and apply> to do this quickly.

Back to top

Last Published: 2016-12-08.