On 2012-09-23 05:25:09, Paws wrote:
> Hello Eric,
>
> I added TestMethodName to my .vimrc, created mapping:
>
> nnoremap <silent> <buffer> <leader>ju :call
> eclim#java#util#Java('org.junit.runner.SingleJUnitTestRunner',
> eclim#java#util#GetFullyQualifiedClassname()."\\#".TestMethodName())<cr>
>
> and created jar with class from
>
http://stackoverflow.com/questions/9288107/run-single-test-from-a-junit-class-using-command-line
> .
>
> When I add this jar to maven dependencies and I run mvn elipse:eclipse jar
> is added to project classpath to I can run test for only one method.
>
> I wanted to ask however if I do not want to add my jar to maven
> dependencies is there some directory in Eclim or Eclipse where I can copy
> this jar with SingleJUnitTestRunner class so it will be visible to all
> projects?
>
> Thanks,
>
> Marcin
While a little gross, you should be able to accomplish what you want
by adding the jar to the list of jre jars:
Window > Preferences > Java Installed JREs
Then pick the jre you are using, then "Edit", followed by "Add
External Jars". Any jar added there *should* be auto added to the
classpath when running java from eclim.
It's also worth noting that I've started working on an all new :JUnit
command which should be able to replace your custom mapping and the
need for that custom runner. It should be available on github in the
next week or two depending on the amount of time I get to work on it.
--
eric