Running junit ant-task without build.xml
===

I'm trying to work out how I can run an ant task without actually needed a build.xml.
In particular I want to run a `JUnit` task with a formatter. In xml format this looks like below:

	<junit printsummary="true" errorProperty="test.failed" failureProperty="test.failed">
		<classpath refid="run.class.path" />

		<!-- console log -->
		<formatter type="xml" classname="be.x.SFFormatter" />

		<test name="be.x.SF" outfile="result" todir="${build.output.dir}" />
	</junit>

It works when running the ant script, but I would like to get my app running as a runnable jar.
Running the tests from Java was easy:

		JUnitCore junit = new JUnitCore();
		testResult = junit.run(SeleniumFramework.class);

However, I struggle to work out how to actually get the formatter to work.
The formatter is of type `org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter` so I doubt I can just plug it in somewhere without running ant.

Has anyone done something similar before?
Thanks!