user442920
user442920

Reputation: 847

how to build Hadoop eclipse plugin

I would like to be able to build Hadoop eclipse plugins from

http://svn.apache.org/repos/asf/hadoop/common/tags/

I have managed to get the source into my Eclipse workstation using subclipse, and now I want to build the jar. Do I build it as executable jar? There is no launch configuration associated to the source. Is there a tutorial on how to do this?

Upvotes: 0

Views: 1559

Answers (1)

Tariq
Tariq

Reputation: 34184

The usual approach is :

  1. Checkout the code from Apache's SVN (Done in your case).
  2. Modify build.properties in /src/contrib/eclipse-plugin and add : eclipse.home=/path/to/your/eclipse/folder
  3. Download apache forrest 0.8 and sun jdk (Preferably java 6).
  4. Run ant command as "ant clean package -Djava6.home=/usr/lib/jvm/java-6-sun (Change the path according your machine and make sure you are connected to the network)
  5. At this point eclipse plugin should be there in /build/contrib/eclipse-plugin but the jar is not yet ready to work as it misses some required jars.
  6. Add the following jars from your HADOOP_HOME/lib folder to the plugin/lib folder commons-configuration-1.6.jar commons-httpclient-3.0.1.jar commons-lang-2.4.jar jackson-core-asl-1.0.1.jar jackson-mapper-asl-1.0.1.jar
  7. Modify MANIFEST.MF in /META-INF of the jar to include the path of these added jars.
  8. Copy this jar to plugins folder of eclipse
  9. Run "eclipse -clean"

There are some posts over the net for the same. See if they work for you :

Link 1

Link 2

Upvotes: 3

Related Questions