Ant安装:
解压Ant:
tar -xvzf apache-ant-1.9.2-bin.tar.gz
移动重命名:
mv apache-ant-1.9.2/ ~/opt/ mv apache-ant-1.9.2/ ant
配置环境变量,添加ANT_HOME,和$ANT_HOME/bin:
sudo vim /etc/profile
....................... export ANT_HOME=/opt/ant export PATH=$PATH:$ANT_HOME/bin .......................
source /etc/profile
测试是否生效:
ant -versionApache Ant(TM) version 1.9.2 compiled on July 8 2013
Hadoop Eclipse 插件安装:
Hadoop的eclipse插件需要自行安装编译,也很简单,用ant进行编译打包
cd /opt/hadoop-1.2.1/src/contrib/eclipse-plugin
此处贴出build.xml全部和META-INFO改动的:
build.xml
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->
<!-- build.xml -->
<!-- Override classpath to include Eclipse SDK jars -->
<!-- Skip building if eclipse.home is unset. -->
<!-- Override jar target to specify manifest -->