Skip to content
haebin edited this page Jan 2, 2012 · 43 revisions

How to Build eReviewBoard Plugin

Ughhh! This is for SUPER NOVICES such as myself.

Tools Setup

  1. Install Eclipse Indigo J2EE
  2. Help > Install New Software

Project Checkout & Build

  1. Checkout eRB plugin from Github
    File > Import > Git > Projects from Git
  • Clone https://haebin@github.com/haebin/ereviewboard.git
  • Clear filter text by clicking eraser icon and select ereviewboard git repository
  • Cancel (Since you have cloned your project successfully.)
  • Import as Existing Maven Project
  • Select all poms and finish
  1. Set as Target Platform
  • Open ereviewboard.target in the eRB root with Target Editor
  • In the top right corner, click 'Set as Target Platform' - This will resolve all the dependency bundles.
  1. Now, you need to import all the sub projects in order to start coding!
    File > Import > Maven > Existing Maven Projects
  • Select top directory of the eRB plugin source.
  • Select all the sub projects (Or the projects you are interested in) and finish.
  1. Build eRB plugins and install bundles
  • Select root project and Run As > Maven Install

How to Add Additional Dependencies

  1. Open ereviewboard.target in the root project of eRB with Target Editor.
  2. Add plugin update site for the plugins (which includes your needed bundles).
  3. Modify MANIFEST.MF in the each sub project:
Require-Bundle: org.eclipse.core.runtime,
     ...,
     org.eclipse.team.svn.core;bundle-version="[0.7.9,1.0.0)"
  1. Import classes from the bundle you just added in your source code.

How to Hot Swap eReviewBoard Plugin Binaries

  1. You need to have two Eclipses installed for coding and running the plugin.
  2. For target eclipse which runs the plugin, add the following to eclipse.ini:
-Xrunjdwp:transport=dt_socket,address=1090,server=y,suspend=n
  1. Select target jars from TARGET_ECLIPSE_HOME/plugins.
TARGET_ECLIPSE_HOME/plugins/org.review_board.ereviewboard.subclipse.ui_0.11.0.201112291757.jar
  1. Rename and unzip the jar file and change the dir name to xxx.jar.
  2. For your coding eclipse, select a source project for the xxx.jar and set the build target dir using linked folder to xxx.jar dir.
  3. You need to unzip the xxx.jar again since it will remove all the files by setting up the target dir.
  4. Now, you don't need to install it every single time. Just, restart your eclipse. (Sometimes, hot swap works)

How to Make and Run Test Cases

  1. You need to make a separated bundle...

  2. Run as JUnit Plugin Test (Since, I didn't know this, I had to go thru hell.)

  3. ... work in progress

Now You Are Ready to Code!!!