Dear Wiki user, You have subscribed to a wiki page or wiki category on "Lucene-hadoop Wiki" for change notification.
The following page has been changed by MarkButler: http://wiki.apache.org/lucene-hadoop/EclipseEnvironment ------------------------------------------------------------------------------ Refer to the [http://www.polarion.org/index.php?page=faq&project=subversive Subversive FAQ]. + === Configuring Eclipse to build Hadoop === + + Building all of Hadoop in Eclipse is a little complicated because there are some DDL files used by the tests that need to compiled first. Therefore it is necessary to configure Eclipse to call part of the Ant script to build these, and have two build directories, one for the Ant script, the other for Eclipse, as you need to include the classes built by Ant on the library path and Eclipse forbids circular references. + + In Eclipse, select Project -> Properties -> Java Build Path -> Source + + Then ensure the following source directories are on the Java build path: + {{{ + hadoop/src/examples + hadoop/src/java + hadoop/src/test + }}} + Then if you want to use the contrib directories as well: + {{{ + hadoop/src/contrib/test + hadoop/src/contrib/abacus/examples + hadoop/src/contrib/abacus/src/java + hadoop/src/contrib/data_join/src/join + hadoop/src/contrib/hbase/src/java + hadoop/src/contrib/hbase/src/test + hadoop/src/contrib/streaming/src/java + hadoop/src/contrib/streaming/src/test + }}} + and set the output folder to hadoop/eclipse-build. + + Then select Project -> Properties -> Java Build Path -> Libraries + + Add all the libraries in hadoop/lib and hadoop/lib/jetty-ext. + + If you are using contrib also use hadoop/src/contrib/hbase/lib + + Then add hadoop/build/test/classes to the library path + + Then select Project->Properties->Builders + + Add a new Ant builder. Select the top level build.xml as the build file. Next on the page with tab + "targets", after clean specify + {{{ + compile-core-classes, compile-core test + }}} + then after manual build specify + {{{ + compile-core-classes, compile-core-tests, compile + }}} + Apply these changes. Hopefully Hadoop should now build successfully in Eclipse without any errors. + + +
