蚂蚁运行应用程序,该命令不会分叉

时间:2013-02-16 18:04:30

标签: java ant

我从ant启动我的应用程序,但是当它通过命令cmd命令行启动时 它只是在前台运行,并没有继续下一个目标 我怎么能执行应用程序,然后通过ant使用junit任务测试它?

<target name="init" depends="compile,run,test" description="init build ">
</target>

<target name="compile" depends="build_dirs"
        description="compile the source " >
    <javac srcdir="${src}" destdir="${build}" verbose="${TALK}" includeantruntime="false" >

        <classpath refid="class.path" />
    </javac>    
  </target>


<target name="run">

        <java classname="${main-class}" fork="true">    
            <env key="LD_LIBRARY_PATH" value="${libs_java_library_path}:${env.LD_LIBRARY_PATH}"/>       

             <classpath>                
               <pathelement location="../lib/misc/log4j.jar"/>             
               <pathelement path="conf"/>
               <pathelement path="dist/lib"/>
             </classpath>             
        </java>
</target>


<target name="test"  >
    <junit printsummary="no" showoutput="true">
      <classpath refid="test.classpath"/>      
      <formatter type="brief" usefile="false" />
      <test name="com.controller.core.workflowShouldHaveValidXML" />          
    </junit>
  </target>

测试目标从未执行过,为什么?

0 个答案:

没有答案