Creates the output directories : Setup « Ant « Java

Creates the output directories

<?xml version="1.0"?>
<project name="Template Buildfile" default="compile" basedir=".">
  <property name="dir.src" value="src"/>
  <property name="" value="build"/>
  <property name="dir.dist" value="dist"/>

  <!-- Creates the output directories -->
  <target name="prepare">
    <mkdir dir="${}"/>
    <mkdir dir="${dir.dist}"/>

  <target name="clean"
          description="Remove all generated files.">
    <delete dir="${}"/>
    <delete dir="${dir.dist}"/>

  <target name="compile" depends="prepare"
          description="Compile all source code.">
    <javac srcdir="${dir.src}" destdir="${}"/>

  <target name="jar" depends="compile"
          description="Generates java2s.jar in the 'dist' directory.">
    <jar jarfile="${dir.dist}/java2s.jar" 

       3 k)

Related examples in the same category

1.Ant property set up
2.Check Properties