关闭

编译hadoop eclipse插件的 build.xml

标签: hadoop
667人阅读 评论(0) 收藏 举报
分类:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>  
<project default="jar" name="eclipse-plugin">  
  <property name="name" value="${ant.project.name}"/>  
  <property name="root" value="${basedir}"/>  
  <property name="hadoop.root" location="/home/hadoop/hadoop"/>  
  <property name='version' value='1.2.1'/>  
  <property name='eclipse.home' location='/home/hadoop/eclipse'/>  
  <property name="build.dir" location="${hadoop.root}/build/contrib/${name}"/>  
  <property name="build.classes" location="${build.dir}/classes"/>  
  <property name="src.dir"  location="${root}/src/java"/>  
    
  <path id="eclipse-sdk-jars">  
    <fileset dir="${eclipse.home}/plugins/">  
      <include name="org.eclipse.ui*.jar"/>  
      <include name="org.eclipse.jdt*.jar"/>  
      <include name="org.eclipse.core*.jar"/>  
      <include name="org.eclipse.equinox*.jar"/>  
      <include name="org.eclipse.debug*.jar"/>  
      <include name="org.eclipse.osgi*.jar"/>  
      <include name="org.eclipse.swt*.jar"/>  
      <include name="org.eclipse.jface*.jar"/>  
      <include name="org.eclipse.team.cvs.ssh2*.jar"/>  
      <include name="com.jcraft.jsch*.jar"/>  
    </fileset>   
  </path>  
  <!-- Override classpath to include Eclipse SDK jars -->  
  <path id="classpath">  
   <fileset dir="${hadoop.root}">  
    <include name="*.jar"/>  
   </fileset>  
    <path refid="eclipse-sdk-jars"/>  
  </path>  
  
 <target name="compile">  
  <mkdir dir="${build.dir}/classes"/>  
       <javac  
     encoding="ISO-8859-1"  
     srcdir="${src.dir}"  
     includes="**/*.java"  
     destdir="${build.classes}"  
     debug="on"  
     deprecation="off">  
     <classpath refid="classpath"/>  
    </javac>  
  </target>  
  <!-- Override jar target to specify manifest-->  
  <target name="jar" depends="compile">  
    <mkdir dir="${build.dir}/lib"/>  
    <copy file="${hadoop.root}/hadoop-core-${version}.jar" tofile="${build.dir}/lib/hadoop-core.jar" verbose="true"/>  
    <copy file="${hadoop.root}/lib/commons-cli-1.2.jar"  todir="${build.dir}/lib" verbose="true"/>  
    <copy file="${hadoop.root}/lib/commons-configuration-1.6.jar"  todir="${build.dir}/lib" verbose="true"/>  
    <copy file="${hadoop.root}/lib/commons-httpclient-3.0.1.jar"  todir="${build.dir}/lib" verbose="true"/>  
    <copy file="${hadoop.root}/lib/jackson-core-asl-1.8.8.jar"  todir="${build.dir}/lib" verbose="true"/>  
    <copy file="${hadoop.root}/lib/commons-lang-2.4.jar"  todir="${build.dir}/lib" verbose="true"/>  
    <copy file="${hadoop.root}/lib/jackson-mapper-asl-1.8.8.jar"  todir="${build.dir}/lib" verbose="true"/>  
    <jar  
      jarfile="${build.dir}/hadoop-${name}-${version}.jar"  
      manifest="${root}/META-INF/MANIFEST.MF">  
      <fileset dir="${build.dir}" includes="classes/ lib/"/>  
      <fileset dir="${root}" includes="resources/ plugin.xml"/>  
    </jar>  
  </target>  
</project>  
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:28363次
    • 积分:87
    • 等级:
    • 排名:千里之外
    • 原创:30篇
    • 转载:5篇
    • 译文:0篇
    • 评论:2条
    文章分类
    最新评论