alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Ant example source code file (uuencode-test.xml)

This example Ant source code file (uuencode-test.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Ant tags/keywords

The uuencode-test.xml source code

<project default="all" xmlns:au="antlib:org.apache.ant.antunit">
  <property name="ant.build.dir" location="../../../../../build"/>
  <property name="my.build.dir"
            location="${ant.build.dir}/ant-unit/uuencode-dir"/>
  <property name="classes.dir" location="${my.build.dir}/classes"/>

  <available property="sun.uudecode.avail" classname="sun.misc.UUDecoder"/>

  <target name="define" if="sun.uudecode.avail">
    <mkdir dir="${classes.dir}"/>
    <javac srcdir="src" destdir="${classes.dir}" debug="yes"/>
    <taskdef name="uuencode" classname="task.UUEncodeTask"
             classpath="${classes.dir}"/>
    <taskdef name="uudecode" classname="task.UUDecodeTask"
             classpath="${classes.dir}"/>
  </target>

  <target name="test-simple" depends="define" if="sun.uudecode.avail">
    <uuencode infile="${ant.file}"
              outfile="${my.build.dir}/uuencoded"/>
    <uudecode infile="${my.build.dir}/uuencoded"
              outfile="${my.build.dir}/decoded"/>
    <au:assertTrue>
      <filesmatch file1="${ant.file}" file2="${my.build.dir}/decoded"/>
    </au:assertTrue>
  </target>

  <target name="all">
    <au:antunit>
      <fileset file="${ant.file}"/>
      <au:plainlistener/>
    </au:antunit>
  </target>
</project>

Other Ant examples (source code examples)

Here is a short list of links related to this Ant uuencode-test.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.