Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well, combined with hs3180's answer, here is what I actually did in configuring the compiling.</p> <ol> <li><p>In <strong>${eclipse-plugin-src}/build.xml</strong>, use the following directives to include required jars by the eclipse-plugin. Note here that, instead of from <code>${hadoop.root}/build</code>, copying of the <code>hadoop-core-${version}.jar</code> is now from <code>${hadoop.root}</code> directly, because if you are using the compiled version of hadoop, the <code>${hadoop.root}/build</code> folder would be actually empty. Copying of the <code>commons-cli-${commons-cli.version}.jar</code> is now from <code>${hadoop.root}/lib</code> for the same reason. </p> <pre><code>&lt;!-- &lt;copy file="${hadoop.root}/build/hadoop-core-${version}.jar" tofile="${build.dir}/lib/hadoop-core.jar" verbose="true"/&gt; --&gt; &lt;!-- &lt;copy file="${hadoop.root}/build/ivy/lib/Hadoop/common/commons-cli-${commons-cli.version}.jar" todir="${build.dir}/lib" verbose="true"/&gt; --&gt; &lt;copy file="${hadoop.root}/hadoop-core-${version}.jar" tofile="${build.dir}/lib/hadoop-core.jar" verbose="true"/&gt; &lt;copy file="${hadoop.root}/lib/commons-cli-${commons-cli.version}.jar" todir="${build.dir}/lib" verbose="true"/&gt; &lt;copy file="${hadoop.root}/lib/commons-configuration-${commons-configuration.version}.jar" todir="${build.dir}/lib" verbose="true"/&gt; &lt;copy file="${hadoop.root}/lib/commons-httpclient-${commons-httpclient.version}.jar" todir="${build.dir}/lib" verbose="true"/&gt; &lt;copy file="${hadoop.root}/lib/commons-lang-${commons-lang.version}.jar" todir="${build.dir}/lib" verbose="true"/&gt; &lt;copy file="${hadoop.root}/lib/jackson-core-asl-${jackson.version}.jar" todir="${build.dir}/lib" verbose="true"/&gt; &lt;copy file="${hadoop.root}/lib/jackson-mapper-asl-${jackson.version}.jar" todir="${build.dir}/lib" verbose="true"/&gt; </code></pre></li> <li><p>Modify the <strong>${eclipse-plugin-src}/META-INF/MANIFEST.MF</strong> file to accommodate the changes made to <strong>${eclipse-plugin-src}/build.xml</strong>.</p> <pre><code>Bundle-ClassPath: classes/, lib/hadoop-core.jar, lib/commons-cli-1.2.jar, lib/commons-configuration-1.6.jar, lib/jackson-core-asl-1.8.8.jar, lib/commons-httpclient-3.0.1.jar, lib/jackson-mapper-asl-1.8.8.jar, lib/commons-lang-2.4.jar </code></pre></li> <li><p>Modify the <strong>${hadoop.root}/src/contrib/build-contrib.xml</strong> file at two places. The first is to set up the properties needed for the plugin compiling. And the second is to make sure jars, especially <code>hadoop-core-1.0.4.jar</code>, in the <code>${hadoop.root}</code> folder are visible to javac, because the eclipse-plugin references the hadoop classes. This setup is different from the first two in purpose and thus not dispensable.</p> <pre><code>&lt;!-- Properties added for compiling eclipse-plugin --&gt; &lt;!-- http://yiyujia.blogspot.com/2012/11/build-hadoop-eclipse-plugin-from-source.html --&gt; &lt;property name="eclipse.home" location="/Users/xuj/Downloads/eclipse/"/&gt; &lt;property name="version" value="1.0.4"/&gt; &lt;property name="commons-cli.version" value="1.2"/&gt; &lt;!-- the normal classpath --&gt; &lt;path id="contrib-classpath"&gt; &lt;fileset dir="${hadoop.root}"&gt; &lt;include name="*.jar" /&gt; &lt;/fileset&gt; &lt;!-- more path elements go here --&gt; &lt;/path&gt; </code></pre></li> </ol> <p>When all files correctly configured, call '<strong>ant jar</strong>' from <code>${eclipse-plugin-src}/</code> in the console shall be sufficient for the rest. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload