编译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-->
答案 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
commonscli.version=1.2
commonsconfiguration.version=1.6
commonshttpclient.version=3.0.1
commonslang.version=2.4
jacksoncoreasl.version=1.8.8
jacksonmapperasl.version=1.8.8
METAINF / MANIFEST.MF中的
:
BundleClassPath: classes/,
lib/hadoopcore.jar,
lib/commonscli1.2.jar,
lib/commonsconfiguration1.6.jar,
lib/jacksoncoreasl1.8.8.jar,
lib/commonshttpclient3.0.1.jar,
lib/jacksonmapperasl1.8.8.jar,
lib/commonslang2.4.jar
在build.xml中,添加后:
<fileset dir="${hadoop.root}">
<include name="*.jar" />
</fileset>
最后,执行ant jar并将生成的插件添加到eclipse中。