hadoop的Eclipse插件

时间:2013-04-29 05:28:06

标签: eclipse plugins hadoop

编译eclipse插件时出现问题,这是我得到的错误

/usr/local/hadoop/src/contrib/eclipse-plugin$ ant
Buildfile: /usr/local/hadoop/src/contrib/eclipse-plugin/build.xml

BUILD FAILED
/usr/local/hadoop/src/contrib/eclipse-plugin/build.xml:22: The following error occurred while executing this line:
/usr/local/hadoop/src/contrib/build-contrib.xml:43: Element type "property" must be followed by either attribute specifications, ">" or "/>".

Total time: 0 seconds

和修改后的行是

41:  <!--modificacion de hadoop-->
42:  <!-- Property added for compiling eclipse plugin -->
43:  <property name="src.eclipse"  location="${root}/usr/lib/eclipse"/> 
44:  <!--cerrado-->

1 个答案:

答案 0 :(得分:0)

您是否按照教程创建了此插件? 如果仅修改build.xml,我认为它不会起作用。以下是我使用和工作的内容:

编辑buildcontrib.xml (下面的行取决于你的hadoop版本,我用1.2.1 hadoop尝试了所有这些)

<property name="version" value="1.2.1" />

<property name="eclipse.home" value="/path/to/eclipse/home" />

在build.properties中编辑并添加以下行:

eclipse.home=/path/to/eclipse/home

version=1.2.1

commons­cli.version=1.2

commons­configuration.version=1.6

commons­httpclient.version=3.0.1

commons­lang.version=2.4

jackson­core­asl.version=1.8.8

jackson­mapper­asl.version=1.8.8

METAINF / MANIFEST.MF中的

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

在build.xml中,添加后:

<fileset dir="${hadoop.root}">

      <include name="*.jar" />

</fileset>

最后,执行ant jar并将生成的插件添加到eclipse中。