Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: for the plan.

Jump to: navigation, search

PTP/environment setup 90


Setup for development of PTP 9.x

This is applicable to Neon development for PTP.

  • Post-Neon-based development (PTP 9.2) is on the ptp git repo master branch
  • Neon-based development (June 2016 PTP 9.1.x bug fixes) is on the ptp git repo ptp_9_1 branch
  • Mars-based development (June 2015 PTP 9.0.x bug fixes) is on the ptp git repo ptp_9_0 branch

Git reference info: Links to Git info

These instructions describe using the master branch of the repository. Please let us know (e.g. on ptp-dev mailing list) if these instructions need updating.

PTP 9.x needs Java 1.8, Eclipse 4.6/Neon and CDT supported by Luna (9.1)

Set an API baseline.

In these steps, you will download the previous release of PTP. Eclipse's API Tooling will compare the current API with the API from the previous release to check for breaking changes.

  1. Download the PTP master archive of the previous major release of PTP. This will be a file named
  2. Unzip it into some directory (e.g. ptp-baseline-8.0.0)
  3. Open the Eclipse workbench preferences dialog. (On Windows or Linux, click Window > Preferences; on Mac OS X, click Eclipse > Preferences)
  4. Expand the "Plug-in Development" category, and choose "API Baselines"
  5. Click "Add Baseline..." In the dialog, enter "Default" for the name, choose the directory from step 2 for the location, click "Reset", and then click "Finish" to close the New API Baseline dialog.
  6. Click OK to close the Preferences dialog. (If a message dialog appears asking whether you want to perform a full build, click Yes.)

Checking out PTP projects with Git

The following repositories are required parts part of PTP:

  • org.eclipse.ptp.git (required)
  • org.eclipse.remote.git (required) - if you omit this, runtime workbench will ask for Remote Service Provider to be selected (Jsch won't be the default)

The following are optional:

  • org.eclipse.photran.git (optional, only if you want to build Photran)
  • org.eclipse.ptp.master.git (optional, only if you are building PTP packages)
  • org.eclipse.ptp.doc.git (optional, only if you want additional PTP documents)

Import the repositories you want to work on:

  1. File>Import ... then use the 'Git>Projects from Git' import wizard.
  2. Select "URI" and click Next >
  3. If you haven't yet cloned the repository to your machine:
    • Under Location: URI: enter the repository URI and click Next >:
    • Choose the branches you want to clone (usually master and the most recent ptp_x_0 release e.g. ptp_7_0) and click Next >.
      • Note: all workspaces on your machine that talk to this local clone of the repository will all use the same branch at a time. You may want separate clones of the repo (one for each release/branch) for this reason. If so, the last page of the wizard lets you specify a different directory for this clone and you don't have to use same name as remote repo name for your directory. (Note: each clone can, and usually does, have multiple branches in it, so you can use one repo clone for working on multiple branches. But each time you switch between branches it may take a while and may have to rebuild everything, so most developers use multiple clones, each usually pointed at one branch apiece. So e.g. checking in files to ptp_x_0 and then merging with master can be done more quickly, working with the two different clones that don't need to switch themselves.)
        • One convention for names of your local cloned repositories: Make two clones of the git repo, one for master (upcoming release work) and one for the ptp_x_0 branch (e.g. Kepler 7.0-based work). You can put both branches in each clone.
          • One set of suggested names of the repos:
          1. Set of repos where 'master' is the (default) branch used - for Luna work (that is, name the repo to match the default branch -- or, just use the same name as the server repo)
            • org.eclipse.ptp-luna
            • org.eclipse.photran-luna
            • org.eclipse.ptp.master-luna (this is the aggregated build project for eclipse hudson build server. Most developers won't need to clone this.)
          2. Set of repos where 'ptp_7_0' is the (default) branch used - for Kepler work
            • org.eclipse.ptp-kepler
            • org.eclipse.photran-kepler
            • org.eclipse.ptp.master-kepler (this is non-gerrit, probably need to change for gerrit) (this is the aggregated build project for eclipse hudson build server. Most developers won't need to clone this.)
    • Click Next> to choose where you want the repository located locally. It can be anywhere. See suggested names above if you don't have a better idea.
      • Also choose what you want the default branch to be (if other than master)
    • Click Finish. The repository should be downloaded.
    • Once the repository has downloaded you should see it in the list. Select it.
  4. If you have already cloned the repository, and it isn't shown in the list (e.g. Clone done from another workspace)
    • Select Add... and add it.
    • You should now see it in the list. Select it.
  5. Click Next> then Next> again and you should see a list of all the projects.
  6. Select all of the projects except the following (omitting them is optional; you can also just close then later if you like, or just ignore errors), then click Finish. (The tests projects are unit tests for RDT; to compile and run them, you would need to check out the source code for CDT's unit testing projects and their dependencies. Omitting them just keeps confusing build errors out of your way.)
    • org.eclipse.ptp.rdt.core.tests
    • org.eclipse.ptp.rdt.ui.tests
    • org.eclipse.ptp.rdt.sync.rsync.core (no longer there May 2014)
    • org.eclipse.ptp.rdt.sync.rsync.ui (no longer there May 2014)

Repeat the steps to import another repository (e.g. Photran).

Build errors

You may see build errors. You may close these projects (right mouse on project, Close Project) because they don't need to build on your machine (many of these are test plugins, and plugins with C code which are generally used to build and run on the remote target machines)

  • org.eclipse.ptp.debug.sdm
  • org.eclipse.ptp.proxy
  • org.eclipse.ptp.rdt.core.remotejars
  • org.eclipse.ptp.rdt.core.tests
  • anything ending in *tests
  • org.eclipse.ptp.sci, org.eclipse.ptp.utils

Git Preferences - set options

It is also necessary to set Git options to ensure that updates are done correctly.

ONCE ONLY: (Git settings are saved on disk, so shared across workspaces and Eclipse installations.)

  • Open Window>Preferences>Team>Git>Configuration
  • Select the "User Settings" tab
  • Click "Add Entry"
  • For "Key", enter branch.autosetuprebase
  • For "Value", enter always
  • Click "OK"


  • Open Window>Preferences>Team>Git>Configuration if it's not already open
  • Select the "Repository Settings" tab
  • Select the repository from the "Repository" dropdown
  • Click "Add Entry"
  • For "Key", enter branch.master.rebase
  • For "Value", enter true
  • Click "OK"
  • If you are working on the ptp_8_0 branch (or other branches)
    • Do the same thing, but use key branch.ptp_X_Y.rebase

Applying patches from Bugzilla

  • Via patch in bugzilla
    • Need to document how to properly create a patch in Git patch format.
    • Determine the URL of the GIT patch within the bugzilla bug. (Under attachments, on bugzilla web page for the bug, obtain URL of the patch you wish to apply. E.g. right mouse, copy link...depending on your browser)
    • Rightmouse on a project in Project Explorer, Team > Apply Patch. Enter the URL of the patch. Apply as a patch to the workspace root. You may have to remove one or more 'leading segments' to make the project end up at the proper level within your workspace file structure.
  • Via patch within Mylyn bugzilla task
    • TBD

Build internal PTP parts

Building LML Driver for system monitoring

The first time, or if changes occur in org.eclipse.ptp.lml.da.server:

  • In project org.eclipse.ptp.rm.lml.da.server, create a new lml-driver.tar by right clicking on build.xml and selecting Run As > Ant Build


Updating existing projects

  • Right-click on a project and use Team>Pull - this updates the existing projects in your entire local repository, and the current branch in your workspace

Platform Git workflows wiki page has more detail here (including splitting Pull into its two actual steps of Fetch and Merge]


  • Make sure you have set branch.autosetuprebase=always and branch.<name>.rebase=true as described above
  • This causes a Pull (analogous to a 'cvs update') to do the following:
    • Fetch
    • Rebase (It undoes all local commits, fast-forwards the local version to the remote one, and then reapplies the local commits)
  • Otherwise a Pull only does a Fetch/Merge which causes a spaghetti like history

If new projects have been added to the repository,

  • Do an Import ... Git > Projects from Git, Next, Choose 'Local', Next, Choose your repository, Next, Next (leave default for 'Import existing projects' and working directory), and on the 'Import Projects' page you should see all the existing projects greyed out, since you already have them in your workspace; make sure all the new projects are checked and hit 'Finish'.

New Branches

  • If a new branch is added to the repo and you want to get the new branch into your local repo, do:
    • Team > Pull to get changes from remote repo (e.g. existence of the new branch) into your local repo
    • Team > Switch to > New Branch... and for Source Ref, choose the new remote branch

Committing to remote Git repository

There are two steps to getting code changes in the remote repository at commit then push. (This was a single commit step in CVS. Eclipse's EGit allows this in a single step via a "Commit and Push" button as well.)

  1. Pull to get the latest changes and prevent errors when you push
    • right-click on any project in the repository and use Team>Pull
  2. Commit to your local repository - this can be on single files or groups/whole project
    • right-click on your project and use Team>Commit
    • If there is a associated bugzilla - copy and paste the bug number, for example, Bug 400832 (or [400832])- and the bug title or other description of the fix.
  3. Push to copy it to the remote repository - do it on project, e.g. from Project Explorer; all commits in your local repository (including other projects) get pushed up to
    • right-click on any project in the repository and use Team>Push to Upstream

Alternatively, you can

  1. Team>Pull (on any project in the repo) first to make sure you've updated, then
  2. Team>Commit and use the checkbox to 'Push the changes to upstream' at the bottom of the 'Commit Changes' dialog.

Platform Git workflows wiki page is helpful here.

Here are the steps:

  • If there is an associated bugzilla for the change, then assigned to yourself that is "take" the Bugzilla.
  • Checkout the branch you want to commit changes, for example local:master -> remote:master
  • If it is already checked out, Pull to make sure it is in sync
  • Make changes / Apply patch
  • Commit. Specify Bugzilla if available, and specify Author - contributor of the patch, and yourself as Committer.
  • Push.
    • If push failed, you may not be having latest version. Rerun pull.
  • If e.g. you need to commit to both branches ptp_8_0 and master, then commit to ptp_8_0 first then go to master and merge.
  • If there is an associated bugzilla for the change, then mark the Bugzilla RESOLVED - FIXED. Note: The bugzilla is marked verified/closed after the release.

In history view you should see

[master][origin/master][HEAD] Bug xxx - your fix

API baseline and code formatter

Copy LML Driver tar file

If you are developing PTP from source in your development workspace and launching into a runtime workspace you also get a similar error to the one above:

"Unable to locate payload "lml-driver.tar" in bundle "org.eclipse.ptp.rm.lml.da.server""

TO fix this, see above section " building LML driver for system monitoring "

Launching a runtime workbench running the code you checked out into your workspace

  1. Run > Debug Configurations ...
  2. Double-click on 'Eclipse Application' - or click and click on the 'new' icon
  3. Defaults are probably ok to run with all the plugin projects in your workspace; hit 'Debug' in lower right corner

Compiling XML Schema (XSD) into Java classes using the JAXB compiler (xjc)

Should there be a need to alter the provided schemas for the JAXB Resource Manager (or any other such JAXB tooling), follow these steps to set up compilation:

  1. Download jaxb-ri (xjc); e.g., from JAXB Project (Note: Mac OS X already has xjc installed)
  2. Install it somewhere on your local machine
  3. In your project workspace, create an External Tools Configuration. The following is an example based on org.eclipse.ptp.rm.jaxb.core, which has the .xsd in the data directory:
    1. Location: {jaxb-ri directory}/bin/ or /usr/bin/xjc
    2. Working Directory: ${workspace_loc:/org.eclipse.ptp.rm.jaxb.core}
    3. Arguments: data/resource_manager_type.xsd -p -d src

Each time you run this, all the source files generated from the schema will be overwritten.

Back to the top