﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-cerulean-随笔分类-Ant</title><link>http://www.blogjava.net/cerulean/category/19906.html</link><description /><language>zh-cn</language><lastBuildDate>Tue, 14 Aug 2007 10:36:15 GMT</lastBuildDate><pubDate>Tue, 14 Aug 2007 10:36:15 GMT</pubDate><ttl>60</ttl><item><title>eclipse中的ant</title><link>http://www.blogjava.net/cerulean/archive/2007/08/14/136689.html</link><dc:creator>cerulean</dc:creator><author>cerulean</author><pubDate>Tue, 14 Aug 2007 07:18:00 GMT</pubDate><guid>http://www.blogjava.net/cerulean/archive/2007/08/14/136689.html</guid><wfw:comment>http://www.blogjava.net/cerulean/comments/136689.html</wfw:comment><comments>http://www.blogjava.net/cerulean/archive/2007/08/14/136689.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/cerulean/comments/commentRss/136689.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/cerulean/services/trackbacks/136689.html</trackback:ping><description><![CDATA[<span style="FONT-SIZE: 10pt">在eclipse中已经集成了ant，如果创建名为build.xml的文件，就会被识别为ant的文件。ShowView-&gt;Outline会有一些提示。<br>在eclipse中,右键build.xml,<br>选择:Run As Ant Build,会执行默认的任务<br>选择:Run As Ant Build...,在弹出框中,可以选择执行哪些任务.<br><br>当直接使用ant命令时，可以用-D来输入参数，<br>例如ant -buildfile package.xml -Dversion=1_0，指定了version的值。<br></span>
<img src ="http://www.blogjava.net/cerulean/aggbug/136689.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/cerulean/" target="_blank">cerulean</a> 2007-08-14 15:18 <a href="http://www.blogjava.net/cerulean/archive/2007/08/14/136689.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用ant</title><link>http://www.blogjava.net/cerulean/archive/2007/02/08/98864.html</link><dc:creator>cerulean</dc:creator><author>cerulean</author><pubDate>Thu, 08 Feb 2007 13:18:00 GMT</pubDate><guid>http://www.blogjava.net/cerulean/archive/2007/02/08/98864.html</guid><wfw:comment>http://www.blogjava.net/cerulean/comments/98864.html</wfw:comment><comments>http://www.blogjava.net/cerulean/archive/2007/02/08/98864.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/cerulean/comments/commentRss/98864.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/cerulean/services/trackbacks/98864.html</trackback:ping><description><![CDATA[
		<p>使用ant:<br />1. eclipse 3.x 版本都集成了ant.可以直接用.但是脱离了eclipse就没法用了.<br />2. 在机器上安装ant:从ant.apache.org上下载,解压到DOWNLOAD_ANT_HOME<br />    配置环境变量:ANT_HOME= DOWNLOAD_ANT_HOME<br />                             PATH= %PATH%;%ANT_HOME%\bin<br />    windows下需要重启机器才能生效.<br />    注意:还需要把junit.jar包,手工拷贝到ANT_HOME\lib下面才可以让ant正确执行junit测试.(或者把junit.jar包也放进工程的lib里面作为classpath)<br />             否则会导致BUILD FAILED: The classpath for junit must include junit.jar if not in Ant's own classpath.<br />    命令行方式进入工程所在目录,敲入ant,则自动找寻该目录下build.xml的构建文件,并执行构建</p>
		<p>错误总是防不胜防，层出不穷：<br />    本来ant在eclipse里面都试通了，觉得安装个独立的ant，在命令行下执行也没啥问题，可是配置之后，在eclipse下面成功的竟然抛出exception:Unsupported major.minor version 49.0。上网查了一下，应该是编译源代码和执行源代码不是同一个版本的jdk而引起的。因此，修改了build.xml，加入了clean的打扫编译后的class文件的target。再次ant时，等于是重新编译，重新执行junit test case，就通过了。</p>
<img src ="http://www.blogjava.net/cerulean/aggbug/98864.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/cerulean/" target="_blank">cerulean</a> 2007-02-08 21:18 <a href="http://www.blogjava.net/cerulean/archive/2007/02/08/98864.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在eclipse中使用Ant执行JUnit</title><link>http://www.blogjava.net/cerulean/archive/2007/02/08/98863.html</link><dc:creator>cerulean</dc:creator><author>cerulean</author><pubDate>Thu, 08 Feb 2007 13:17:00 GMT</pubDate><guid>http://www.blogjava.net/cerulean/archive/2007/02/08/98863.html</guid><wfw:comment>http://www.blogjava.net/cerulean/comments/98863.html</wfw:comment><comments>http://www.blogjava.net/cerulean/archive/2007/02/08/98863.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/cerulean/comments/commentRss/98863.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/cerulean/services/trackbacks/98863.html</trackback:ping><description><![CDATA[
		<p>
				<strong>建立工程:</strong>
				<br />在eclipse中建立一个java project.<br />AntTest<br /> -src<br />  -com.test<br />   -ABS.java<br />   -ABSTest.java (<strong>Junit Test Case</strong>)<br /> -lib<br /> -build.xml<br /> -JUNIT_HOME/junit.jar<br /><br /><strong>配置:</strong><br />eclipse-&gt;window-&gt;preference-&gt;ANT-&gt;Runtime-&gt;Classpath-&gt;ANT Home Entry<br />选择Add External JAR，加入ECLIPSE_HOME/plugins/org.junit.../junit.jar</p>
		<p>
				<strong>build.xml的内容:<br /></strong>
		</p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<span style="COLOR: #008080"> 1</span>
				<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 2</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">&lt;?</span>
				<span style="COLOR: #ff00ff">xml version="1.0"</span>
				<span style="COLOR: #0000ff">?&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 3</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">project </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="project"</span>
				<span style="COLOR: #ff0000"> default</span>
				<span style="COLOR: #0000ff">="junit"</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 4</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">property </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="run.classpath"</span>
				<span style="COLOR: #ff0000"> value</span>
				<span style="COLOR: #0000ff">="bin"</span>
				<span style="COLOR: #0000ff">&gt;&lt;/</span>
				<span style="COLOR: #800000">property</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 5</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">property </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="run.srcpath"</span>
				<span style="COLOR: #ff0000"> value</span>
				<span style="COLOR: #0000ff">="src"</span>
				<span style="COLOR: #0000ff">&gt;&lt;/</span>
				<span style="COLOR: #800000">property</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 6</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">property </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="test.srcpath"</span>
				<span style="COLOR: #ff0000"> value</span>
				<span style="COLOR: #0000ff">="src"</span>
				<span style="COLOR: #0000ff">&gt;&lt;/</span>
				<span style="COLOR: #800000">property</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 7</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">property </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="test.report"</span>
				<span style="COLOR: #ff0000"> value</span>
				<span style="COLOR: #0000ff">="report"</span>
				<span style="COLOR: #0000ff">&gt;&lt;/</span>
				<span style="COLOR: #800000">property</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 8</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">property </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="lib.dir"</span>
				<span style="COLOR: #ff0000"> value</span>
				<span style="COLOR: #0000ff">="lib"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 9</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">path </span>
				<span style="COLOR: #ff0000">id</span>
				<span style="COLOR: #0000ff">="compile.path"</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">10</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">fileset </span>
				<span style="COLOR: #ff0000">dir</span>
				<span style="COLOR: #0000ff">="${lib.dir}"</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">11</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />   </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">include </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="**/*.jar"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">12</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">fileset</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">13</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">path</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">14</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">target </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="compile"</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">15</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">javac </span>
				<span style="COLOR: #ff0000">destdir</span>
				<span style="COLOR: #0000ff">="${run.classpath}"</span>
				<span style="COLOR: #ff0000"> srcdir</span>
				<span style="COLOR: #0000ff">="${run.srcpath}"</span>
				<span style="COLOR: #ff0000"> classpathref</span>
				<span style="COLOR: #0000ff">="compile.path"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">16</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">javac </span>
				<span style="COLOR: #ff0000">destdir</span>
				<span style="COLOR: #0000ff">="${run.classpath}"</span>
				<span style="COLOR: #ff0000"> srcdir</span>
				<span style="COLOR: #0000ff">="${test.srcpath}"</span>
				<span style="COLOR: #ff0000"> classpathref</span>
				<span style="COLOR: #0000ff">="compile.path"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">17</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">target</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">18</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">target </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="junit"</span>
				<span style="COLOR: #ff0000"> depends</span>
				<span style="COLOR: #0000ff">="compile"</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">19</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">tstamp </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">20</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">mkdir </span>
				<span style="COLOR: #ff0000">dir</span>
				<span style="COLOR: #0000ff">="${test.report}"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">21</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">mkdir </span>
				<span style="COLOR: #ff0000">dir</span>
				<span style="COLOR: #0000ff">="${test.report}/framework-${DSTAMP}-${TSTAMP}"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">22</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">junit </span>
				<span style="COLOR: #ff0000">printsummary</span>
				<span style="COLOR: #0000ff">="true"</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">23</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />   </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">classpath</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">24</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">pathelement </span>
				<span style="COLOR: #ff0000">path</span>
				<span style="COLOR: #0000ff">="${run.classpath}"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">25</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">fileset </span>
				<span style="COLOR: #ff0000">dir</span>
				<span style="COLOR: #0000ff">="${lib.dir}"</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">26</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />     </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">include </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="**/*.jar"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">27</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">fileset</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">28</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />   </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">classpath</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">29</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />   </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">formatter </span>
				<span style="COLOR: #ff0000">type</span>
				<span style="COLOR: #0000ff">="plain"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">30</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />   </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">batchtest </span>
				<span style="COLOR: #ff0000">fork</span>
				<span style="COLOR: #0000ff">="yes"</span>
				<span style="COLOR: #ff0000"> todir</span>
				<span style="COLOR: #0000ff">="${test.report}/framework-${DSTAMP}-${TSTAMP}"</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">31</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">fileset </span>
				<span style="COLOR: #ff0000">dir</span>
				<span style="COLOR: #0000ff">="${test.srcpath}"</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">32</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />     </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">include </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="**/*Test.java"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">33</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">fileset</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">34</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />   </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">batchtest</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">35</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">junit</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">36</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">target</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">37</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080">38</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">project</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">39</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080">40</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
		</div>
		<p>
				<br />
				<br />
				<strong>运行:</strong>
				<br />右键build.xml-&gt;run as "Ant Build".</p>
		<p>
				<strong>结果:</strong>
				<br />控制台有输出结果,例如:<br />Buildfile: C:\Documents and Settings\qianwang\My Documents\D\SMPWorkspace\AntTest\build.xml<br />compile:<br />junit:<br />    [mkdir] Created dir: C:\Documents and Settings\qianwang\My Documents\D\SMPWorkspace\AntTest\report\framework-20070201-1712<br />    [junit] Running com.test.ABSTest<br />    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0 sec<br />BUILD SUCCESSFUL<br />Total time: 19 seconds</p>
		<p>同时,AntTest/report(如果没有自动建立的目录)中,产生.txt格式的文本文件.<br />结果文件中,会指出运行了哪些testcase(指出被测试的方法名test**).<br />如果有failures/errors,异常的详细信息也会输出在这里.</p>
<img src ="http://www.blogjava.net/cerulean/aggbug/98863.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/cerulean/" target="_blank">cerulean</a> 2007-02-08 21:17 <a href="http://www.blogjava.net/cerulean/archive/2007/02/08/98863.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>