Bazaar

Bazaar

 




Wiki Tools

  • Find Page
  • Recent Changes
  • Page History
  • Attachments

Home |

Setting up a bzr-eclipse Development Environment

Use these instructions to set up development environment for working on bzr-eclipse itself. Development will be done in Eclipse.

Requirements

  • Java Development Kit 1.6 or higher
    A Java Runtime Environment (JRE) is not enough. Ensure that your JAVA_HOME environment variable is set correctly, it is required by Maven.

  • "Eclipse for RCP and RAP Developers" 3.7 or higher from http://www.eclipse.org/downloads/
    It's important to choose the RCP/RAP version because it includes all the libraries required for Eclipse plug-in development. The newest version of Eclipse is your best choice, but older versions are probably ok.

  • Bazaar 2.0 or higher

  • Maven 3
    Maven 2 will not work

Install bzr-eclipse

You'll need the bzr-eclipse plugin 1.2 or higher. Currently there is no official download site, but we'll sort that out soon. Earlier versions of bzr-eclipse don't work because they don't create the required Eclipse projects.

From within Eclipse, install like this:

  1. Use the Eclipse menu: Help -> Install New Software to open the "Available Software" dialog.

  2. Press "Add" in the top right corner to open another dialog, and provide the name "bzr-eclipse", and location of the official download site.
  3. Click "OK" to return to the "Available Software" dialog.
  4. In the selection section, open up "Collaboration" and select "Eclipse plugin for Bazaar VCS"
  5. Click "Next", then Eclipse shows dependencies.
  6. Click "Next" again to see the License Agreement.
  7. Accept the License Agreement and click "Finish".
  8. You may receive a warning about unsigned content, which can be accepted via "OK".

Create a new workspace in a new folder

You want a dedicated folder and workspace for bzr-eclipse development because it includes several projects and sub-folders. If you already have an empty workspace, you can use that.

  1. Use the Eclipse menu: "File -> Switch Workspace -> Other" which opens a dialog allowing you to enter a workspace folder.

  2. Enter a new folder name into the dialog and choose "OK" which will cause Eclipse to restart in your new workspace.
  3. Configure your Bazaar user information for commit messages.
    Use the Eclipse menu: "Window -> Preferences", then locate the preference panel: "Team -> Bazaar", and update the field "User id/email:".
    Recommended format is "name launchpad-id <email address>", e.g. Alexander Taler ~alex-idereal <alex@--idereal.--.nz>.

  4. Set the compiler compliance level to 1.5, which is the required value for bzr-eclipse.
    Use Eclipse menu: "Window -> Preferences", then locate "Java -> Compiler".

Fetch code from Launchpad

You need code for these three projects:

The following steps will fetch the code for you and create the required Eclipse projects, using the bzr-eclipse plugin you installed earlier.

  1. In the Eclipse menu, choose "File -> New -> Project" which will open a Wizard.

  2. Select "Bazaar -> Project from Bazaar" and click "Next". You are shown the Eclipse Project from Bazaar wizard.

  3. You may receive a strange warning message about dependencies, ignore it and click "OK".
  4. Enter a URL for the project, e.g. the trunk shown above. bzr-eclipse will suggest a project name and sub-folder, which should be fine. Click "Next" to see the Advanced Options.
  5. Change type to "Branch", so that you don't automatically affect the launchpad branch.
  6. Click "Finish". The Wizard now performs the checkout, but does not provide feedback. Wait patiently because it can take several minutes.
  7. When the dialog is closed, if the Eclipse intro page is still open, close it to go the work-bench view, where you will see the new projects, one for each of bzr-xmloutput and bzr-java-lib, and several for bzr-eclipse.

Fixing the builds and dependencies

At this point Eclipse will report a lot of errors and warnings in the bzr-eclipse projects. To fix these:

  1. In Eclipse, go to the bzr-java-lib project, right-click, select "Run As" -> "Maven install"
    This may take some time to complete, it builds and copies the bzr-java-lib jar file to your Maven repository (probably under ~/.m2)

  2. In a terminal window, go to the bzr-eclipse folder and run "mvn package". This takes some time, and may need to download a bunch of dependencies.
  3. Back in Eclipse, go to each of the projects and press F5 to refresh them, which should remove the errors and warnings.

Running bzr-eclipse in debug mode

Eclipse can run a second Eclipse instance with your development version of bzr-eclipse included.

  1. Select the org.vcs.bazaar.eclipse.ui project

  2. Right click or use the menu to select Debug or Run as Eclipse Application

  3. Create new test workspaces within this second Eclipse.