ant build.xml

<?xml version="1.0"?>

<project name="IocFactory" basedir="." default="build">

    <property name="src.dir" value="src"/>
    <property name="classes.dir" value="classes"/>
    <property name="build.dir" value="${classes.dir}"/>
    <property name="name" value="springapp"/>
<!-- set lib needed for this project -->
    <path id="project.class.path">
        <pathelement path="lib/"/>
        <pathelement path="${java.class.path}/"/>
    </path>
    <target name="default" description="Message!!">
        <echo message="buildpath:${classes.dir}"/>
        <echo message="srcpath:${src.dir}"/>
    </target>
    <target name="build" description="Compile main source tree java files">
        <!-- create dirtionary -->
        <!--<mkdir dir="${build.dir}"/>-->
        <!-- config javac -->
        <javac destdir="${build.dir}" source="1.6" target="1.6" debug="true" deprecation="false" includeantruntime="true" >
            <src path="${src.dir}"/>
            <classpath refid="project.class.path"/>
        </javac>
    </target>
    <target name="clean" description="delete class files">
        <delete>
            <fileset dir="${build.dir}">
                <include name="**/*.class"/>
            </fileset>
        </delete>
    </target>
</project>

你可能感兴趣的:(ant build.xml)