How to build and install hadoop plugin of eclipse holies (3.6)

Eclipse version: holies (3.6)
OS version: Ubuntu 10.04
hadoop version: 0.20.2

Requirement: Your computer must installed Java5, apache ant and forrest.

Step:
  1. Create new file called 'eclipse-plugin.build.properties' in user home and add 「eclipse.home=/path/to/eclipse/home」 property in it.
  2. Change to ${hadoop.home} and run$ ant compile
  3. If it has error during compile. Here is a error that imported JavaApplicationLaunchShortcut class was not found. So, let fix the source code. Edit ${hodoop.home}/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/launch/HadoopApplicationLaunchShortcut.java.//Orginal
    //import org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationLaunchShortcut;
    //New
    import org.eclipse.jdt.debug.ui.launchConfigurations.JavaApplicationLaunchShortcut;
  4. Then,
    $ ant package -Djava5.home="/path/to/java5/home" -Dforrest.home="/path/to/forrest/home"
  5. You can see a generated hadoop-0.20.3-dev-eclipse-plugin.jar file in ${hadoop.home}/build/contrib/eclipse-plugin directory.
  6. Copy it's to eclipse's plugins directory and start eclipse. You will see the plugin has been installed.

    留言

    熱門文章