Ant 1.9.0 contained 2 issues relating to JUnit 4: 1. Ant not compiling if only JUnit 3 was on the classpath. This was discussed as part of this mail thread and resolved with SVN commit 1471109. There shouldn't have been any direct impact on users as it wasn't possible to invoke any of the code that would have thrown class not found exceptions without a unit tests having thrown an AssumptionViolatedException from the JUnit 4 JAR. 2. NoClassDefFoundError if attempting to use a JUnit JAR outside of the Ant lib directory (Bug 54835). This would impact any user who is defining the JUnit JAR in the classpath property for the JUnit task but not having the JAR in Ant's classpath (any user using Ant without adding additional JARs to ANTLIB and using Ivy or Maven tasks to download the JUnit JAR). This was fixed in SVN commit 1470668 by updating the list of classes to be handled by the split class loader.
The basic outcome of this is that there is no requirement for a specific version of JUnit for anyone running the JUnit task, but version 1.9.0 of Ant does require JUnit (the version shouldn't matter) to be on the core classpath. We could update the documentation to specify that any version of JUnit 3 or 4 could be placed on the classpath, providing it satisfies the dependencies in the user's code, but there is no need to specify a specific version of JUnit in our documentation. Thanks, Michael On 6 May 2013, at 10:01, Antoine Levy Lambert <anto...@gmx.de> wrote: > Hi, > > I have noticed a bug report CASSANDRA-5388 concerning Ant 1.9.0 and JUnit > library dependencies. > > Maybe this bug report can help to clarify the exact dependencies of Ant > concerning JUnit. > > The current "install.html" in svn says that Ant is dependent upon junit.jar > without specifying minimal versions and without differentiating between > junit3 and junit4. > > It would help if someone would explain the dependency in more detail. > > Regards, > > Antoine > > On Mar 30, 2013, at 2:44 PM, Stefan Bodewig wrote: > >> On 2013-03-28, Stefan Bodewig wrote: >> >>> On 2013-03-27, Michael Clarke wrote: >> >>>>>> * the optional ant-junit4.jar has been merged into ant-junit.jar >>>>>> as Ant now requires JUnit4. >> >>>> Is it really the case that Ant requires JUnit4? The changes I >>>> introduced for @Ignore annotations in Ant 1.9.0 shouldn't impact >>>> backwards compatibility with JUnit3 and I don't believe any other >>>> changes in the 1.9.0 release force users to need the JUnit4 jar whilst >>>> running tests. >> >>> Some classes in the junit package didn't seem to compile in Gump, I >>> think BriefJUnitFormatter was one of them. >> >> The formatter all now import org.junit.Ignore so require JUnit 4 at >> compile time. It may stil be possible to use JUnit 3 at runtime. >> >> Stefan >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org >> For additional commands, e-mail: dev-h...@ant.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org > For additional commands, e-mail: dev-h...@ant.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org