David M. Karr opened SPR-16948 and commented

My project has a bunch of component and integration tests that require additional classpath entries when they are run. These settings are made in the pom.xml, so the build works fine. However, I'd like to be able to run the tests in Eclipse without any additional set up tasks.  Currently, when I run the tests in Eclipse, I have to remember to first edit the run configuration, to add the required classpath entry.

In this case, I only have to add to it one directory that is part of the project.

I've already asked about this on StackOverflow (https://stackoverflow.com/questions/50884000/how-to-augment-the-classpath-used-by-springjunit4classrunner ), and I was told there's no existing way to do this.


Affects: 5.0.7

Comment From: snicoll

It is actually possible but it is quite involved and even if we added it here, I don't think it would be wise to expose it as a first class citizen.

Check Spring Boot's support for this. This isn't public for the reason above but the code is open source so you can adapt it to your needs. In the meantime, Gradle offers a far more superior classpath arrangement that is well integrated in the IDE.