ant执行build failed

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="Fulfillment" default="compile">
    <!-- all properties are in build.properties -->
    <property file="${basedir}/build.properties"/>
    <!--svn本身需要的运行库 -->
    <path id="svnant.lib">
        <pathelement location="${svnjavahl.jar}"/>
        <pathelement location="${svnant.jar}"/>
        <pathelement location="${svnClientAdapter.jar}"/>
    </path>
    <!--java EE 1.4 库 -->
   <path id="javaEE1.4">
        <fileset dir="${javaEE1.4.lib}">
            <include name="**/*.jar"/>
        </fileset>
    </path>
    <!--项目的classpath库 -->
    <path id="project.classpath">
        <pathelement location="${build.dir}"/>
        <fileset dir="${lib.dir}"/>
    </path>
    <!--清理项目任务(干掉下载目录,tomcat原来的部署文件) -->
    <target name="clear">
        <delete dir="${work.space}"/>
        <!--<delete dir="${tomcat.home}/work/Catalina/localhost/${ant.project.name}"/>
        <delete dir="${tomcat.home}/webapps/${ant.project.name}"/>
        <delete dir="${tomcat.home}/webapps/${ant.project.name}.war"/>-->
    </target>
    <!-- load the svn task -->
    <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="svnant.lib"/>
    <!--svn同步任务-->
    <target name="svn" depends="clear">
        <mkdir dir="${work.space}"/>
        <svn username="myname" password="mypwd" javahl="false">
            <checkout url="${urlRepos}" destPath="${work.space}"/>
        </svn>
    </target>
    <!--编译-->
    <target name="compile"   description="======compile project======">
        <echo message="compile==========>${ant.project.name}: ${ant.file}"/>
        <mkdir dir="${build.dir}"/>
        <copy includeemptydirs="false" todir="${build.dir}">
            <fileset dir="${java.source}" excludes="**/*.launch, **/*.java"/>
        </copy>
        <!--<copy includeemptydirs="false" todir="${build.dir}">
            <fileset dir="${java.config}" excludes="**/*.launch, **/*.java"/>
        </copy>-->
        <javac includejavaruntime="true" debug="true" debuglevel="${debuglevel}" destdir="${build.dir}"
               source="${source}" target="${target}" encoding="UTF-8">
            <src path="${java.source}"/>
            <!--<exclude name="config/"/>-->
            <classpath>
                <path refid="project.classpath">
                </path>
              <path refid="javaEE1.4">
              </path>
            </classpath>
        </javac>
        <!--<javac debug="true" debuglevel="${debuglevel}" destdir="${build.dir}" source="${source}" target="${target}"
               encoding="utf-8">
            <src path="${java.config}"/>
        </javac>-->
    </target>
    <!--压缩,打包-->
    <target name="war" depends="compile" description="======compress j2ee war file======">
        <mkdir dir="${dist.dir}"/>
        <!--compress j2ee war file-->
        <war destfile="${war.file}" webxml="${web.dir}/WEB-INF/web.xml">
            <fileset dir="${web.dir}"/>
            <classes dir="${build.dir}"/>
            <lib dir="${lib.dir}"/>
        </war>
    </target>
    <!--shutdowntomcat-->
    <!--<target name="shutdowntomcat" description="========shutdowntomcat===========">
        <exec executable="${tomcat.home}/bin/shutdown.sh" failonerror="false"></exec>
        <sleep seconds="10"/>
    </target>-->
    <!--startuptomcat-->
    <!--<target name="startuptomcat" description="========startuptomcat===========">
        <sleep seconds="5"/>
        <exec executable="${tomcat.home}/bin/startup.sh" failonerror="false"></exec>
    </target>-->
    <!--部署到tomcat下面克-->
    <!--<target name="deploy" depends="war">
        <copy file="${war.file}" todir="${tomcat.home}/webapps"/>
    </target>-->
    <!--全自动无敌部署,启动关闭tomcat-->
    <!--<target name="auto" depends="shutdowntomcat,deploy,startuptomcat">
        <echo message="DONE!!!!"/>
    </target>-->
</project>


执行报错:

BUILD FAILED
E:\ant\build.xml:4: Property work.space was circularly defined

你可能感兴趣的:(ant)