Skip to content

Setting up EclipseLink

Will Dazey edited this page Mar 21, 2018 · 5 revisions

How to Setup EclipseLink

This is a guide for new users to setup EclipseLink locally for developing and creating pull requests.

Step 1 : Create a fork of eclipselink

Click the Fork button in the upper right corner and select your account as the location to hold the fork. If you already have a fork, click the Fork button anyway to view your existing fork. A suggested name for your fork is:

<github-user-id>/eclipselink

Step 2 : Setting up an inbound/outbound "triangle"

  1. Create a directory on your local system to hold the source code:

    mkdir eclipselink\

    cd eclipselink\

  2. Clone the main repository onto your local system via this command:

    git clone [email protected]:eclipse-ee4j/eclipselink.git

  3. Setup the second side of the triangle via this command (ensure you change <github-user-id> to your GitHub user name (this is your external github.com user):

    cd eclipselink

    git remote add <github-user-id>_fork [email protected]:<github-user-id>/eclipselink.git

  4. Configure the local repository to push your commits to the fork repository:

    git config remote.pushdefault <github-user-id>_fork

    This will now pull from origin and push to your fork repository.

  5. (Optional) This option requires at least Git 1.8.4. It is also recommended that you configure

    git config push.default simple

    Unless you are already using Git 2.0 where it is the default. You can check your git version with the following command:

    git --version

  6. The third side of the triangle are the pull requests from your fork repository to the main repository. This will be accomplished when your pull request is merged after a code review.

  7. You can run the following command to verify your triangle was created successfully:

    git remote -v

    You should see output similar to the following:

    _fork [email protected]:/eclipselink.git (fetch)

    _fork [email protected]:/eclipselink.git (push)

    origin [email protected]:eclipse-ee4j/eclipselink.git (fetch)

    origin [email protected]:eclipse-ee4j/eclipselink.git (push)

  8. Push the 'master' branch to your fork

    git push

(Optional) Step 3 : Checking out other EclipseLink branches

If you plan on creating pull requests for previous EclipseLink versions (ie. '2.6', '2.7'), you will need to checkout these branches into your local repository:

git checkout -b 2.7 origin/2.7

git checkout -b 2.6 origin/2.6

Next steps: