posts - 48, comments - 13, trackbacks - 0, articles - 0
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

Ant的bulid.xml中某个target运行有问题

Posted on 2009-04-28 06:20 董锐 阅读(920) 评论(2)  编辑  收藏
    
 <target name="build" description="Compile main source tree java files into class files, generate jar files">
   <javac destdir="${build.dir}"  listfiles="true"
    debug="true" deprecation="false" optimize="false" failonerror="true">
    <src path="${src.dir}"/>
    <classpath refid="master-classpath"/>
   </javac>
 </target>

最近一个新项目运行这个target总是有问题,在目标路径没有类文件产生。后来发现每次要将该工程的bulidpath做点小变化,如remove哪个路劲再添加回去,让工程重新bulid一下,在运行这个target就可以在目标路径产生类文件了,好奇怪,不知为什么,之前几个项目都是直接运行target就行了的。注:我用的是Eclipse开发工具。

评论

# 1[未登录]  回复  更多评论   

2011-04-22 14:36 by 1
1

# re: Ant的bulid.xml中某个target添加延时  回复  更多评论   

2013-07-31 17:52 by 秦勇
<target name="rentest" description="running testCase!">
<echo message="running testCase begin!"/>
<java fork="false" classname="org.testing.TestNG">
<sysproperty key="net.sourceforge.cobertura.datafile" file="${cobertura.datafile}"/>
<classpath location="${root.build.inject}"/>
<arg value="${testing.file}"/>
</java>
<antcall target="collect"/>
<echo message="running testCase end!"/>
</target>

在调用<antcall target="collect"/>之前加延时

只有注册用户登录后才能发表评论。


网站导航: