Skip to main content
Jump to: navigation, search

PTP/environment setup 60

Revision as of 11:29, 3 November 2011 by (Talk | contribs)

Setup for development of PTP 6.0


Git reference info: Links to Git info

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

PTP 6.0 needs Eclipse 4.2/Juno (or Eclipse 3.7/Indigo), CDT 8.0 or above, and RSE 3.3 (at least)

Install CDT, RSE, Git, and JAXB in your eclipse installation

  1. Help > Install New Software...
  2. Open "Programming Languages" and select "C/C++ Development Tools SDK"
    • Also get the CDT feature "Unified Parallel C Support"
  3. Open "General Purpose Tools" and select "Remote System Explorer End-User Runtime"
  4. Open "Collaboration" and select "Eclipse JGit" and "Eclipse EGit"
  5. Add as a software site
    • Make sure "Show only latest version..." is disabled and "Group items by category" is enabled
    • Select "Java Architecture for XML Binding (JAXB) Implementation Plug-in" and "XML Binding for Java" both version 2.1.9
  6. Optional: Open "Web, XML, JavaEE..." and select "Eclipse XML Editors and Tools" (needed only to create RM configurations, but handy for editing HTML files etc. too)

To check out PTP projects:

  • File>Import ... then use the 'Git>Projects from Git' import wizard.
  • If you haven't yet cloned the repository to your machine:
    • Click on Clone... and enter the repository URI:
    • Use your committer userid and password.
    • Click Next> to choose the branches you want to clone (usually ptp_5_0 and master==HEAD).
    • Click Next> to choose where you want the repository located locally. It can be anywhere.
    • Click Finish. The repository should be downloaded.
    • Once the repository has downloaded you should see it in the list. Select it.
  • 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.
  • Click Next> then Next> again and you should see a list of all the projects.
  • Select the ones you want (usually all) and click Finish.

Repeat the steps to import another repository (e.g. photran). The photran URI is ssh://

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 Preferences>Team>Git>Configuration
  • Select the "User Settings" tab
  • Click "New Entry"
  • For "Key", enter branch.autosetuprebase
  • For "Value", enter always
  • Click "OK"


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


  • 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
  • Otherwise a Pull only does a Fetch/Merge which causes a spaghetti like history

Committing to remote repository

  • Checkout the branch you want to commit changes, for example local:master -> remote:master
  • If it is already checked out, try Fetch to make sure it is in sync
  • Apply patch
  • Commit. Specify Author - contributor of the patch, and yourself as Committer
  • Push.
    • If push failed, you may not be having latest version. In this case Rebase to respective remote branch. It will undo your patch, then fetch, then apply your patch.
  • Fetch. This will synchronize your local branch with latest "push" which is kind of stupid because it was your own push that you just did.

In history view you should see

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

old info

In CVS, check out org.eclipse.ptp/releng/ptp_project_sets as follows:

  1. Window > Open Perspective > Other...,
  2. Choose "CVS Repository Exploring"
  3. Right-click in CVS Repositories view, choose New > Repository Location
    • Host:
    • Repository path: /cvsroot/tools
    • User: anonymous
    • If you have a committer id on, use that, enter the password, and change the Connection type to extssh
  4. Expand that repository and expand HEAD. Scroll down to org.eclipse.ptp and expand it
  5. Expand releng, and check out ptp_project_sets

Now switch to the Plug-in development Perspective

  1. In the ptp_project_sets project in your workspace, right-click on anonymous/ptp-HEAD-all-anonymous.psf and select "Import project set"
    • If you have committer access, use committer/ptp-HEAD-all-committer.psf
    • Alternatively, you can check out ptp-5.0-all-*.psf (committer or anonymous)

PTP developer: API baseline and code formatter

Building runtime binary

To e.g. run with a resource manager, you may have to build some platform-specific binary/proxy code. For example, to run with OpenMPI locally on MACOSX, cd to the org.eclipse.ptp.macosx.x86 project in a terminal window, and execute

  • sh BUILD

This should build the executable 'sdm' in the bin/ directory. Do not be alarmed if you see "LoadLeveler not installed, skipping..." etc - if you do not have these IBM components installed on your system, there is no need for it to build those binaries.

Copy Remote Tools Dstore server jar

If you are using Remote Tools ... you may see the error "Unable to locate payload "rdt-server.jar" in bundle "org.eclipse.ptp.rdt.server.dstore" " when you launch a runtime workspace and make a remote project.

So you must do the following (Until we can build rdt server jar here) ... From a PTP (end-user) installation, unzip eclipse/plugins/org.eclipse.ptp.rdt.server.dstore_xxx.jar into a directory. Then from the unzipped contents move rdt-server.jar to your development workspace project: org.eclipse.ptp.rdt.server.dstore

(This is the file that will be moved up to the remote host location when you create a remote project. Remote Tools installs this jar on the server automatically and starts it for you.)

If you don't, you will see the error popup "Unable to locate payload "rdt-server.jar" in bundle "org.eclipse.ptp.rdt.server.dstore"

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 xjc.bat
    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