Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change 
notification.

The following page has been changed by PhilipZeyliger:
http://wiki.apache.org/hadoop/EclipseEnvironment

------------------------------------------------------------------------------
  
  === Download and install the Subversive plug-in ===
  
+ Subversive helps you manage an SVN checkout in Eclipse.  It's not strictly 
necessary, but the integration is handy.
+ 
   * [http://www.polarion.org/index.php?page=overview&project=subversive 
Subversive web site]
  
  The easiest way to download and install is to use Eclipse's Update Manager. 
  That process is well described one 
[http://www.eclipse.org/subversive/documentation/gettingStarted/aboutSubversive/install.php
 the Subversive's site]. Think to add both two update sites: "Subversive 
plug-in" and "Subversive SVN Connectors plug-in".
  
+ Specifically, you'll want to add the following "update sites" to
+  * 
http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/ 
-- "SVN Connectors Site"
+  * http://download.eclipse.org/technology/subversive/0.7/update-site/ -- 
"Subversive Site" 
+ You'll need to install:
+  * Subversive SVN Connectors
+  * Subversive SVN Team Provider (Incubation)
+  * SVNKit 1.1.7 Implementation (Optional) -- You have a choice of versions 
here.  Use 1.1.7 if your svn is 1.4; use 1.2.2 if your svn is 1.5.
  
  === Associate the Hadoop Trunk Repository ===
  
@@ -25, +34 @@

  === Create a Project ===
  
  From the SVN Repositories perspective:
+  * Turn off "Project...Build Automatically"; it slows things down for this 
step.
   * Right-click Hadoop > "Trunk" and select "Find/Check Out As..."
   * Check out as a project configured using the New Project Wizard
   * Java Project
   * Project Name: "Hadoop"
+  * Be sure to change the "Default output folder" (on the second page of the 
"New Java Project" wizard) to `PROJECT_NAME/build/eclipse-classes`.  If you use 
the default (`PROJECT_NAME/bin`), Eclipse has a tendency to blow away the handy 
scripts in that directory.
  
- === Using Subversive with already checkouted projects ===
+ === Using Subversive with already `checkout`ed projects ===
  
  Refer to the [http://www.polarion.org/index.php?page=faq&project=subversive 
Subversive FAQ].
+ 
+ '''Note''': Using Subversive is optional.  You can point Eclipse to an 
existing source checkout by selecting "Create project from existing source" in 
the "New Java Project" wizard.  Setup the project the same way you would if you 
were doing a fresh checkout (see above).
  
  === Configuring Eclipse to build Hadoop ===
  
@@ -40, +53 @@

  
   1. Set up an `ANT_HOME` Classpath Variable in Eclipse Preferences. This is a 
global Eclipse setting so you only need to do this once.
   1. Checkout Hadoop.
-  1. Run the ''eclipse-files'' ant target (right click build.xml, choose run 
as Ant Build and choose eclipse-files target)
+  1. Run the ''eclipse-files'' ant target (right click build.xml, choose run 
as Ant Build, click "sort targets", and choose eclipse-files target)
-  1. Refresh the Eclipse project.
+  1. Refresh the Eclipse project.  (Hit F5 or right-click on the project, and 
choose "Refresh")
   1. Ensure that the Java version used matches the version of the project 
(currently 1.6 is used). This could be selected for the project by going to 
Project > Preferences > Builders > Hadoop_Ant_Builders. Go to JRE tab and 
select an appropriate Java version.
   1. Select `Project` | `Build Project`.
+ 
+ 
+ ==== Behind the scenes ====
+ 
+ There is nothing magical about the "eclipse-files" target.  It simply copies 
the files from {{.eclipse.templates}} into your project directory.  
{{.classpath}} is the file that needs tweaking most often.  In the UI, you edit 
it "Project...Properties...Java Build Path".  Similarly the builder (that 
invokes Ant) can be configured in the UI in the "Builders" property of the 
project.
+ 
+ ==== Troubleshooting ====
+ 
+  * `Unbound classpath variable: 'ANT_HOME/lib/ant.jar' in project 
'hadoop-trunk'`
+ 
+ You forgot to setup the `ANT_HOME` Classpath Variable in Eclipse Preferences. 
 (`/usr/share/ant` would be a typical setting here.)
+ 
+  * `The following error occurred while executing this line: .../build.xml:30 
The following error occurred while executing this line: 
.../eclipse-plugin/build.xml:61: Compile failed; see the compiler error output 
for details`
+ 
+ The Eclipse plugin is not compatible with Eclipse 3.4.  Because the external 
builder is running ant directly (as opposed to calling out to a process), 
`eclipse.home` is set, and the `eclipse-plugin/build.xml` is activated.  If you 
need to hack around it, either re-configure the external builder to use an 
external process or modify the line `<target name="check-contrib" 
unless="eclipse.home">` to reference, say, `eclipse.home.foo`.
+ 
  
  ==== Manual Settings ====
  

Reply via email to