DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Use Gant as a Concise Enhancer of Ant


Installation

  1. apt-get install groovy;

  2. apt-get install gant;

or install gant manually:

  1. download gant-standalone_1.9.9-1_all.deb from http://gant.codehaus.org/Prepackaged+Distributions;

  2. dpkg -i gant-standalone_1.9.9-1_all.deb;

Translate ant to gant

  1. write a ant script:
<project name="MyHadoopRunner" basedir="./" default="run"> 
    <path id="lib.path"> 
        <fileset dir="/home/lichao/apps/hadoop-1.1.2">
            <include name="**/*.jar" />
        </fileset> 
    </path>
    <target name="compile">
        <javac srcdir="src" destdir="bin" classpathref="lib.path" />
    </target>
    <target name="run" depends="compile">
        <java classname="chapter1.WordCount" classpathref="lib.path" classpath="bin">
            <arg value="src"/>
            <arg value="out"/>
        </java>
    </target>
</project> 
  1. download ant2gant.groovy from gant website;

  2. groovy ant2gant.groovy build.xml > build.gant;

  3. gant.



Published

Jun 8, 2013

Last Updated

Jun 8, 2013

Category

Tech

Tags

  • Ant 21
  • gant 1
  • Java 106

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor