Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "PTP/environment setup 70"
(→Committing to remote repository) |
|||
(52 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
This is applicable to Kepler development for PTP. | This is applicable to Kepler development for PTP. | ||
− | * Kepler-based development (June 2013 release) is on the git repo ''' | + | * Post-Kepler-based development (after 7.0, probably Luna) is on the ptp git repo '''master''' branch |
− | * Juno-based development (PTP 6.0.x) is on the git repo '''ptp_6_0''' branch | + | * Kepler-based development (June 2013 release 7.0.x) is on the ptp git repo '''ptp_7_0''' branch |
+ | * Juno-based development (PTP 6.0.x) is on the ptp git repo '''ptp_6_0''' branch | ||
PTP now uses the git repository at dev.eclipse.org and the CVS repository is now locked for writing. | PTP now uses the git repository at dev.eclipse.org and the CVS repository is now locked for writing. | ||
Line 12: | Line 13: | ||
Please let us know (e.g. on ptp-dev mailing list) if these instructions need updating. | Please let us know (e.g. on ptp-dev mailing list) if these instructions need updating. | ||
− | PTP 7.0 needs Java 1.6, | + | PTP 7.0 needs Java 1.6, Eclipse 4.3/Kepler , CDT supported by Kepler (8.2), and RSE 3.3 (?at least) |
− | * Download Eclipse 4. | + | * Download Eclipse 4.3 (Kepler) here: http://eclipse.org/downloads "Eclipse Standard" (formerly called "Eclipse Classic" is a good choice. Also because it is a SDK. An alternative is RCP. It already includes Egit&Mylyn. |
− | ** | + | ** Developing on a 4.2/Juno SDK will still probably work but we highly recommend using Kepler so we know our code works there. |
** Eclipse 3.x version have not been tested and we do not develop on them. | ** Eclipse 3.x version have not been tested and we do not develop on them. | ||
'''Install CDT, RSE, Git, etc. into Eclipse.''' | '''Install CDT, RSE, Git, etc. into Eclipse.''' | ||
# In Eclipse, click Help > Install New Software... | # In Eclipse, click Help > Install New Software... | ||
− | # In the "Work with:" combo box, choose | + | # In the "Work with:" combo box, choose |
− | #*" | + | #*"Kepler - http://download.eclipse.org/releases/kepler" |
− | + | ||
# Under "Collaboration" | # Under "Collaboration" | ||
− | ## | + | ##''(Optional)'' Mylyn Task List, and Mylyn Tasks Connector: Bugzilla to track PTP bugs via Mylyn within Eclipse workbench |
− | + | ||
# Under "General Purpose Tools", check | # Under "General Purpose Tools", check | ||
− | ## ''(Optional)'' "Parallel Tools Platform | + | ## ''(Optional)'' "Parallel Tools Platform" - while you will probably check out source to override this, having it installed in the workbench can avert later build problems. |
## "Remote System Explorer End-User Runtime" (RSE) | ## "Remote System Explorer End-User Runtime" (RSE) | ||
# Under "Programming Languages", check all of the following: | # Under "Programming Languages", check all of the following: | ||
Line 36: | Line 35: | ||
# ''(Optional)'' Under "Web, XML, JavaEE...", check | # ''(Optional)'' Under "Web, XML, JavaEE...", check | ||
## "Eclipse Web Developer Tools" (useful for editing HTML files) | ## "Eclipse Web Developer Tools" (useful for editing HTML files) | ||
− | ## "Eclipse XML Editors and Tools" (this is useful for editing XML files, e.g. creating | + | ## "Eclipse XML Editors and Tools" (this is useful for editing XML files, e.g. creating target system configurations) |
# Click the "Next >" button, click the "Next >" button, select accept agreement radio button and click the "Finish" button to complete the installation. Restart Eclipse when prompted. | # Click the "Next >" button, click the "Next >" button, select accept agreement radio button and click the "Finish" button to complete the installation. Restart Eclipse when prompted. | ||
− | JAXB shouldn't be needed to install | + | JAXB shouldn't be needed to install, JAXB is now part of the Java 1.6 libraries |
'''Set an API baseline.''' | '''Set an API baseline.''' | ||
Line 46: | Line 45: | ||
# Download the PTP master archive of the previous major release of PTP. This will be a file named ptp-master-xxx.zip. | # Download the PTP master archive of the previous major release of PTP. This will be a file named ptp-master-xxx.zip. | ||
− | # | + | #* After June 2013 Kepler release it will be PTP 7.0.0: ptp-master-7.0.0-xxx.zip found on http://download.eclipse.org/tools/ptp/builds/7.0.0/ |
− | + | # Unzip it into some directory (e.g. ptp-baseline-7.0.0) | |
− | # Unzip it into some directory (e.g. ptp-baseline- | + | |
# Open the Eclipse workbench preferences dialog. (On Windows or Linux, click Window > Preferences; on Mac OS X, click Eclipse > Preferences) | # Open the Eclipse workbench preferences dialog. (On Windows or Linux, click Window > Preferences; on Mac OS X, click Eclipse > Preferences) | ||
# Expand the "Plug-in Development" category, and choose "API Baselines" | # Expand the "Plug-in Development" category, and choose "API Baselines" | ||
Line 54: | Line 52: | ||
# Click OK to close the Preferences dialog. (If a message dialog appears asking whether you want to perform a full build, click Yes.) | # 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 | + | == Checking out PTP projects with Git == |
#File>Import ... then use the 'Git>Projects from Git' import wizard. | #File>Import ... then use the 'Git>Projects from Git' import wizard. | ||
Line 60: | Line 58: | ||
#If you haven't yet cloned the repository to your machine: | #If you haven't yet cloned the repository to your machine: | ||
#*Under Location: URI: enter the repository URI and click Next >: | #*Under Location: URI: enter the repository URI and click Next >: | ||
− | #** | + | #***ssh://user@git.eclipse.org:29418/ptp/org.eclipse.ptp -or- |
− | #*** | + | #***https://user@git.eclipse.org/r/p/ptp/org.eclipse.ptp |
− | + | #***For ssh you need to upload your ssh public key here: https://git.eclipse.org/r/#/settings/ssh-keys | |
− | #*** | + | #***For https the password is the one shown here: https://git.eclipse.org/r/#/settings/http-password |
− | #*Choose the branches you want to clone (usually | + | #***For details see: http://wiki.eclipse.org/Gerrit |
− | #**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. | + | #*Choose the branches you want to clone (usually ptp_7_0 and master==HEAD) and click Next >. |
− | #***One convention for this: Make two clones of the git repo, one for master ( | + | #**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_7_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 this: Make two clones of the git repo, one for master (Luna-based work) and one for the ptp_7_0 branch (Kepler 7.0.x-based work). You can put both branches in each clone. | ||
#****One set of suggested names of the repos: | #****One set of suggested names of the repos: | ||
− | #***#Set of repos where 'master' is the (default) branch used - for | + | #***#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.) | ||
+ | #***#Set of repos where 'ptp_7_0' is the (default) branch used - for Kepler work | ||
#***#*org.eclipse.ptp-kepler | #***#*org.eclipse.ptp-kepler | ||
#***#*org.eclipse.photran-kepler | #***#*org.eclipse.photran-kepler | ||
− | #***#*org.eclipse.ptp.master-kepler (this is | + | #***#*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. | #*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) | #** Also choose what you want the default branch to be (if other than master) | ||
Line 84: | Line 83: | ||
#*You should now see it in the list. Select 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. | #Click Next> then Next> again and you should see a list of all the projects. | ||
− | #Select all of the projects ''except'' the following, then click Finish. (The | + | #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.core.tests | ||
− | |||
− | |||
#*org.eclipse.ptp.rdt.ui.tests | #*org.eclipse.ptp.rdt.ui.tests | ||
+ | #*org.eclipse.ptp.rdt.sync.'''rsync'''.core | ||
+ | #*org.eclipse.ptp.rdt.sync.'''rsync'''.ui | ||
Repeat the steps to import another repository (e.g. Photran). | Repeat the steps to import another repository (e.g. Photran). | ||
Line 114: | Line 113: | ||
*For "Value", enter '''true''' | *For "Value", enter '''true''' | ||
*Click "OK" | *Click "OK" | ||
− | *If you are working on the | + | *If you are working on the ptp_7_0 branch (or other branches) |
**Do the same thing, but use key '''branch.ptp_X_Y.rebase''' | **Do the same thing, but use key '''branch.ptp_X_Y.rebase''' | ||
+ | |||
+ | == 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 | ||
+ | |||
+ | === Obtaining sdm runtime binary for debugger === | ||
+ | |||
+ | '''This is no longer necessary in most cases. PTP 7.0 moves a pre-built sdm to the remote host automatically, for most platforms.''' | ||
+ | Need to check to see if we need to do something for dev workspace launching, though. | ||
+ | |||
+ | To locate the sdm runtime binary, use the ptp-sdm-*.zip package from here: http://download.eclipse.org/tools/ptp/builds/kepler/nightly/ | ||
+ | (The ptp-proxy-* package from previous releases is no longer needed). | ||
+ | |||
+ | Download the ptp-sdm-*.zip package. Unzip it and locate the pre-build sdm binary for your target platform (directory name matches platform). | ||
+ | Move the pre-built sdm binary for your target platform to some location onto the remote target. | ||
+ | This is the binary sdm you will need to locate from the debug launch dialog. | ||
== Updating == | == Updating == | ||
− | + | ||
+ | '''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-releng/Git_Workflows#Update_to_pull_in_the_latest_changes_to_HEAD | Platform Git workflows wiki page]] has more detail here (including splitting '''Pull''' into its two actual steps of '''Fetch''' and '''Merge'''] | [[Platform-releng/Git_Workflows#Update_to_pull_in_the_latest_changes_to_HEAD | Platform Git workflows wiki page]] has more detail here (including splitting '''Pull''' into its two actual steps of '''Fetch''' and '''Merge'''] | ||
Line 128: | Line 146: | ||
** Rebase (It undoes all local commits, fast-forwards the local version to the remote one, and then reapplies the local commits) | ** 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 | * 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 repository == | == Committing to remote repository == | ||
− | There are two steps to getting code changes in the remote repository at git.eclipse.org. (This was a single '''commit''' step in CVS. | + | There are two steps to getting code changes in the remote repository at git.eclipse.org: commit then push. (This was a single '''commit''' step in CVS. Eclipse Kepler's EGit allows this in a single step via a "Commit and Push" button as well.) |
− | + | ||
− | + | ||
− | + | ||
# '''Pull''' to get the latest changes and prevent errors when you push | # '''Pull''' to get the latest changes and prevent errors when you push | ||
#* right-click on any project in the repository and use '''Team>Pull''' | #* right-click on any project in the repository and use '''Team>Pull''' | ||
+ | # '''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. | ||
# '''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 git.eclipse.org | # '''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 git.eclipse.org | ||
#* right-click on any project in the repository and use '''Team>Push to Upstream''' | #* right-click on any project in the repository and use '''Team>Push to Upstream''' | ||
+ | |||
+ | Alternatively, you can | ||
+ | # '''Team>Pull''' (on any project in the repo) first to make sure you've updated, then | ||
+ | # '''Team>Commit''' and use the checkbox to 'Push the changes to upstream' at the bottom of the 'Commit Changes' dialog. | ||
[[Platform-releng/Git_Workflows#Commit_changes_to_the_main_repo | Platform Git workflows wiki page]] is helpful here. | [[Platform-releng/Git_Workflows#Commit_changes_to_the_main_repo | Platform Git workflows wiki page]] is helpful here. | ||
Here are the steps: | 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 | * 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 | * If it is already checked out, Pull to make sure it is in sync | ||
Line 148: | Line 179: | ||
* Push. | * Push. | ||
** If push failed, you may not be having latest version. Rerun pull. | ** If push failed, you may not be having latest version. Rerun pull. | ||
+ | * If e.g. you need to commit to both branches ptp_7_0 and master, then commit to ptp_7_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. | * 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. | ||
Line 157: | Line 189: | ||
* Set up PTP code formatter - see [[PTP/developer_guidelines]] for PTP formatting and cleanup profiles | * Set up PTP code formatter - see [[PTP/developer_guidelines]] for PTP formatting and cleanup profiles | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Copy Remote Tools Dstore server jar == | == Copy Remote Tools Dstore server jar == | ||
Line 177: | Line 202: | ||
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" | 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" | ||
+ | |||
+ | == 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 == | == Launching a runtime workbench running the code you checked out into your workspace == |
Latest revision as of 15:24, 25 July 2013
Contents
- 1 Setup for development of PTP 7.0
- 2 Checking out PTP projects with Git
- 3 Build internal PTP parts
- 4 Updating
- 5 Committing to remote repository
- 6 API baseline and code formatter
- 7 Copy Remote Tools Dstore server jar
- 8 Copy LML Driver tar file
- 9 Launching a runtime workbench running the code you checked out into your workspace
- 10 Compiling XML Schema (XSD) into Java classes using the JAXB compiler (xjc)
Setup for development of PTP 7.0
This is applicable to Kepler development for PTP.
- Post-Kepler-based development (after 7.0, probably Luna) is on the ptp git repo master branch
- Kepler-based development (June 2013 release 7.0.x) is on the ptp git repo ptp_7_0 branch
- Juno-based development (PTP 6.0.x) is on the ptp git repo ptp_6_0 branch
PTP now uses the git repository at dev.eclipse.org and the CVS repository is now locked for writing.
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 7.0 needs Java 1.6, Eclipse 4.3/Kepler , CDT supported by Kepler (8.2), and RSE 3.3 (?at least)
- Download Eclipse 4.3 (Kepler) here: http://eclipse.org/downloads "Eclipse Standard" (formerly called "Eclipse Classic" is a good choice. Also because it is a SDK. An alternative is RCP. It already includes Egit&Mylyn.
- Developing on a 4.2/Juno SDK will still probably work but we highly recommend using Kepler so we know our code works there.
- Eclipse 3.x version have not been tested and we do not develop on them.
Install CDT, RSE, Git, etc. into Eclipse.
- In Eclipse, click Help > Install New Software...
- In the "Work with:" combo box, choose
- "Kepler - http://download.eclipse.org/releases/kepler"
- Under "Collaboration"
- (Optional) Mylyn Task List, and Mylyn Tasks Connector: Bugzilla to track PTP bugs via Mylyn within Eclipse workbench
- Under "General Purpose Tools", check
- (Optional) "Parallel Tools Platform" - while you will probably check out source to override this, having it installed in the workbench can avert later build problems.
- "Remote System Explorer End-User Runtime" (RSE)
- Under "Programming Languages", check all of the following:
- "C/C++ Development Tools SDK"
- "Fortran Development Tools (Photran)"
- "Unified Parallel C (UPC) Support" (this includes CDT's LR parser)
- "XL C/C++ Compiler Support"
- (Optional) Under "Web, XML, JavaEE...", check
- "Eclipse Web Developer Tools" (useful for editing HTML files)
- "Eclipse XML Editors and Tools" (this is useful for editing XML files, e.g. creating target system configurations)
- Click the "Next >" button, click the "Next >" button, select accept agreement radio button and click the "Finish" button to complete the installation. Restart Eclipse when prompted.
JAXB shouldn't be needed to install, JAXB is now part of the Java 1.6 libraries
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.
- Download the PTP master archive of the previous major release of PTP. This will be a file named ptp-master-xxx.zip.
- After June 2013 Kepler release it will be PTP 7.0.0: ptp-master-7.0.0-xxx.zip found on http://download.eclipse.org/tools/ptp/builds/7.0.0/
- Unzip it into some directory (e.g. ptp-baseline-7.0.0)
- Open the Eclipse workbench preferences dialog. (On Windows or Linux, click Window > Preferences; on Mac OS X, click Eclipse > Preferences)
- Expand the "Plug-in Development" category, and choose "API Baselines"
- 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.
- 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
- File>Import ... then use the 'Git>Projects from Git' import wizard.
- Select "URI" and click Next >
- If you haven't yet cloned the repository to your machine:
- Under Location: URI: enter the repository URI and click Next >:
- ssh://user@git.eclipse.org:29418/ptp/org.eclipse.ptp -or-
- https://user@git.eclipse.org/r/p/ptp/org.eclipse.ptp
- For ssh you need to upload your ssh public key here: https://git.eclipse.org/r/#/settings/ssh-keys
- For https the password is the one shown here: https://git.eclipse.org/r/#/settings/http-password
- For details see: http://wiki.eclipse.org/Gerrit
- Choose the branches you want to clone (usually ptp_7_0 and master==HEAD) 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_7_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 this: Make two clones of the git repo, one for master (Luna-based work) and one for the ptp_7_0 branch (Kepler 7.0.x-based work). You can put both branches in each clone.
- One set of suggested names of the repos:
- 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.)
- 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.)
- One convention for this: Make two clones of the git repo, one for master (Luna-based work) and one for the ptp_7_0 branch (Kepler 7.0.x-based work). You can put both branches in each clone.
- 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_7_0 and then merging with master can be done more quickly, working with the two different clones that don't need to switch themselves.)
- 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.
- Under Location: URI: enter the repository URI and click Next >:
- 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 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
- org.eclipse.ptp.rdt.sync.rsync.ui
Repeat the steps to import another repository (e.g. Photran).
- The Photran URI is ssh://userid@git.eclipse.org/gitroot/ptp/org.eclipse.photran.git; for non-commiters, use git://git.eclipse.org/gitroot/ptp/org.eclipse.photran.git.
- The aggregated build is org.eclipse.ptp.master (most folks won't need this); you will have to import as General project or it won't see any projects
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"
FOR EACH REPOSITORY YOU HAVE CLONED:
- 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_7_0 branch (or other branches)
- Do the same thing, but use key branch.ptp_X_Y.rebase
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
Obtaining sdm runtime binary for debugger
This is no longer necessary in most cases. PTP 7.0 moves a pre-built sdm to the remote host automatically, for most platforms. Need to check to see if we need to do something for dev workspace launching, though.
To locate the sdm runtime binary, use the ptp-sdm-*.zip package from here: http://download.eclipse.org/tools/ptp/builds/kepler/nightly/ (The ptp-proxy-* package from previous releases is no longer needed).
Download the ptp-sdm-*.zip package. Unzip it and locate the pre-build sdm binary for your target platform (directory name matches platform). Move the pre-built sdm binary for your target platform to some location onto the remote target. This is the binary sdm you will need to locate from the debug launch dialog.
Updating
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]
Note:
- 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 repository
There are two steps to getting code changes in the remote repository at git.eclipse.org: commit then push. (This was a single commit step in CVS. Eclipse Kepler's EGit allows this in a single step via a "Commit and Push" button as well.)
- Pull to get the latest changes and prevent errors when you push
- right-click on any project in the repository and use Team>Pull
- 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.
- 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 git.eclipse.org
- right-click on any project in the repository and use Team>Push to Upstream
Alternatively, you can
- Team>Pull (on any project in the repo) first to make sure you've updated, then
- 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_7_0 and master, then commit to ptp_7_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
- Set up API baseline see PTP/developer_guidelines for API Baseline setup (API Tools)
- Set up PTP code formatter - see PTP/developer_guidelines for PTP formatting and cleanup profiles
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 (purely) 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"
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
- Run > Debug Configurations ...
- Double-click on 'Eclipse Application' - or click and click on the 'new' icon
- 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:
- Download jaxb-ri (xjc); e.g., from JAXB Project (Note: Mac OS X already has xjc installed)
- Install it somewhere on your local machine
- 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:
- Location:
{jaxb-ri directory}/bin/xjc.sh
or/usr/bin/xjc
- Working Directory:
${workspace_loc:/org.eclipse.ptp.rm.jaxb.core}
- Arguments:
data/resource_manager_type.xsd -p org.eclipse.ptp.rm.jaxb.core.data -d src
- Location:
Each time you run this, all the source files generated from the schema will be overwritten.