xml 无法识别我的终止标签?

xml not recognizing my termination tag?

这是我的代码

<?xml version="1.0" encoding="UTF-8"?>
  <project name="ant" default="main" basedir=".">

    <!-- Vytvorime si cesty-->
    <property name="src.dir" location="ija/ija2016/homework2"/>
    <oroperty name="build.dir" location="bin"/>
    <property name="test.output.dir" location="output"/>

    <path id="junit.class.path"/>
      <pathelement location="lib/junit.jar"/>
      <pathelement location="${build.dir}"/>
    </path>


    <!-- Funkcia pre vytvorenie adresarov -->
    <target name="makedir">
            <mkdir dir="${build.dir}" />
            <mkdir dir="${test.output.dir}" />
    </target>


    <!-- Funkcia pre vymazanie adresarov -->
       <target name="clean">
               <delete dir="${build.dir}" />
               <delete dir="${test.output.dir}" />
       </target>



       <!-- Compile funkcia pre 3. ulohu -->
       <target name="compile">
          <javac srcdir="${src.dir}" destdir="${build.dir}">
            <classpath refid="junit.class.path"/>
          </javac>


          <!-- Run funkcia pre 3. ulohu -->
          <target name="run" depends="compile">
                 <junit printsummary="on" fork="true" haltonfailure="yes">
                         <classpath refid="junit.class.path" />
                         <formatter type="xml" />
                         <batchtest todir="${test.output.dir}">
                                 <fileset dir="${src.dir}">
                                         <include name="**/*HomeWork2Test*.java" />
                                 </fileset>
                         </batchtest>
                 </junit>
         </target>

         <target name="main" depends="compile, junit">
                 <description>Ant pre spustenie testov HomeWork2Test</description>
         </target>

 </project>

这是我的错误代码:

BUILD FAILED
/(path to file)/build.xml:12: The element type "project" must be terminated by the matching end-tag "</project>".

尽管我的代码显然有终止 </project> 标记。知道我做错了什么吗?

你的道路XML

<path id="junit.class.path"/>
  <pathelement location="lib/junit.jar"/>
  <pathelement location="${build.dir}"/>
</path>

在结束 path 标记的第一行包含斜杠。

将第一行改为

<path id="junit.class.path">

您还需要一个 </target> 结束标记

   <target name="compile">
      <javac srcdir="${src.dir}" destdir="${build.dir}">
        <classpath refid="junit.class.path"/>
      </javac>


      <!-- Run funkcia pre 3. ulohu -->
      <target name="run" depends="compile">
             <junit printsummary="on" fork="true" haltonfailure="yes">
                     <classpath refid="junit.class.path" />
                     <formatter type="xml" />
                     <batchtest todir="${test.output.dir}">
                             <fileset dir="${src.dir}">
                                     <include name="**/*HomeWork2Test*.java" />
                             </fileset>
                     </batchtest>
             </junit>
     </target>

     <target name="main" depends="compile, junit">
             <description>Ant pre spustenie testov HomeWork2Test</description>
     </target>