<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Paul Moser &#187; Ant</title>
	<atom:link href="http://blog.paulmoser.co.uk/index.php/category/software/java/ant/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.paulmoser.co.uk</link>
	<description>So much to learn but so little time</description>
	<lastBuildDate>Thu, 17 Sep 2009 21:28:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>junit.jar and Ant</title>
		<link>http://blog.paulmoser.co.uk/index.php/2007/01/02/junitjar-and-ant/</link>
		<comments>http://blog.paulmoser.co.uk/index.php/2007/01/02/junitjar-and-ant/#comments</comments>
		<pubDate>Tue, 02 Jan 2007 23:58:09 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Ant]]></category>
		<category><![CDATA[JUnit]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Unit Testing]]></category>

		<guid isPermaLink="false">http://blog.paulmoser.co.uk/index.php/2007/01/02/junitjar-and-ant/</guid>
		<description><![CDATA[At last no more messing about copying junit.jar or modifying your system classpath to get JUnit to work with Ant. Version 1.7 allows you to specify its location in a classpath element in your build file.
See the last point from the manual page for the JUnit task:
Note: You must have junit.jar available. You can do [...]]]></description>
			<content:encoded><![CDATA[<p>At last no more messing about copying junit.jar or modifying your system classpath to get <a href="http://www.junit.org/">JUnit</a> to work with <a href="http://ant.apache.org/">Ant.</a> Version 1.7 allows you to specify its location in a classpath element in your build file.</p>
<p>See the last point from the <a href="http://ant.apache.org/manual/OptionalTasks/junit.html">manual page for the JUnit task:</a></p>
<blockquote><p>Note: You must have junit.jar available. You can do one of:<br />
1. Put both junit.jar and ant-junit.jar in ANT_HOME/lib.<br />
2. Do not put either in ANT_HOME/lib, and instead include their locations in your CLASSPATH environment variable.<br />
3. Add both JARs to your classpath using -lib.<br />
4. Specify the locations of both JARs using a  element in a  in the build file.<br />
5. Leave ant-junit.jar in its default location in ANT_HOME/lib but include junit.jar in the  passed to . (since Ant 1.7)</p></blockquote>
<p>One thing to be careful of, make sure you include the <code>junit.jar</code> file that you want, you probably want to make the <code>classpath</code> element specifying the location of the <code>junit.jar</code> file the first classpath element in your junit task &#8211; I spent quite a bit of time trying to work out why the tests annotated with the new JUnit 4 <code>@Test</code> annotation weren&#8217;t getting run only to eventually find a JUnit 3.1 <code>junit.jar</code> file from the <a href="http://www.springframework.org/">Spring Framework</a> in the classpath before the JUnit 4 <code>junit.jar</code> file.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.paulmoser.co.uk/index.php/2007/01/02/junitjar-and-ant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
