【发布时间】:2012-01-15 19:05:01
【问题描述】:
我的 ant 脚本有问题! 在我的 jUnit 测试中,我必须使用 System.getProperty 设置一个字符串。 当我使用 eclipse 和 vm 参数时一切正常,但使用 ant 脚本我无法传递系统属性...
这是我的蚂蚁 sn-p:
<junit fork="yes" haltonfailure="false" showoutput="true">
<sysproperty key="sdkpath" value="some path"/>
or
<jvmarg value="-Dsdk_path=/some path/"/>
<batchtest fork="false" todir="${execution.home}">
<fileset dir="${basedir}/src">
<include name="**/**Test*.java" />
<exclude name="**/MonkeyTest.java"/>
</fileset>
</batchtest>
<formatter type="xml" usefile="true" />
<classpath refid="test.classpath" />
</junit>
【问题讨论】:
标签: ant properties junit system