Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 125 lines (88 sloc) 3.934 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
<?xml version="1.0"?>

<project default="dist" basedir="." name="Auto Container Java Lib">

    <description>Auto Container Java Lib</description>

    <property file="build.properties"/>

    
    <!-- *******************************************************************
CHECK JDK REQUIREMENTS
******************************************************************* -->

    <target name="checkjdk">
        
        <available property="jdk1.5+"
                   classname="java.lang.Readable"/>
        <fail message="Aborting: determined you are not building with >= JDK 1.5"
              unless="jdk1.5+" />

    </target>


    <!-- *******************************************************************
INITIALIZE
******************************************************************* -->

    <target name="init" depends="checkjdk">

        <available file="${autocommon.lib.dir}"
                   type="dir"
                   property="libs.present" />

        <fail message="Failure, directory does not exist: ${autocommon.lib.dir}"
              unless="libs.present" />

        <mkdir dir="${autocommon.build.dir}"/>
        <mkdir dir="${autocommon.dist.dir}"/>
    </target>


    <!-- *******************************************************************
COMPILATION
******************************************************************* -->

    <path id="autocommon.deps.classpath">
        <fileset dir="${autocommon.lib.dir}">
              <include name="*.jar"/>
        </fileset>
    </path>
    <path id="autocommon.all.classpath">
        <fileset dir="${autocommon.lib.dir}">
              <include name="*.jar"/>
        </fileset>
        <fileset dir="${autocommon.dist.dir}">
            <include name="*.jar"/>
        </fileset>
    </path>

    <target name="compile" depends="init">

        <javac srcdir="${autocommon.src.dir}"
               destdir="${autocommon.build.dir}"
               classpathref="autocommon.deps.classpath"
               includeantruntime="false"
               target="1.5"
               source="1.5"
               debug="on">

            <include name="**/*.java"/>
            <compilerarg value="${nimbus.java.compilerarg}" />

        </javac>

        <copy todir="${autocommon.build.dir}" >
              <fileset dir="${autocommon.src.dir}"
                       includes="**/*.properties" />
              <fileset dir="${autocommon.src.dir}"
                       includes="**/*.xml" />
              <fileset dir="${autocommon.src.dir}"
                       includes="**/*.txt" />
        </copy>

    </target>


    <!-- *******************************************************************
CREATE ARCHIVE FILE
******************************************************************* -->

    <target name="jar" depends="compile">
        <jar destfile="${autocommon.dist.dir}/${autocommon.jar.name}"
             basedir="${autocommon.build.dir}"/>
    </target>


    <!-- *******************************************************************
CREATE DISTRIBUTION
******************************************************************* -->

    <target name="dist" depends="jar">
        <delete dir="${autocommon.build.dir}"/>
    </target>


    <!-- *******************************************************************
CREATE SPECIAL DISTRIBUTION
******************************************************************* -->

    <target name="webdist" depends="dist">
        
    </target>

    
    <!-- *******************************************************************
CLEAN
******************************************************************* -->

    <target name="clean">
        <delete dir="${autocommon.build.dir}"/>
        <delete dir="${autocommon.dist.dir}"/>
        <echo message="Cleaned: ${basedir}" />
    </target>

</project>
Something went wrong with that request. Please try again.