Jul 7th, 2009, 12:42 AM
Access restrictions on SpringJUnit4ClassRunner class
When I try to annotate an integration test class with @RunWith(SpringJUnit4ClassRunner.class), I get an access rule error in Eclipse.
I'm obtaining the org.springframework.test-2.5.6.SEC01 bundle by expressing an optional dependency on it in template.mf and letting the Bundlor classpath container resolve it for me.
Drilling down through the build path/bundle classpath container to that bundle, I can see the access rule that only org.springframework.test.* should be accessible.
1. Where does this access rule come from, and what is its purpose?
2. I can work around this by lowering the severity level of access restriction rules in Eclipse. Is that reasonable?
3. Is putting the dependency in the manifest the best way to get access to that test package? The greenpages sample seems to do it via a maven dependency, but what if you don't use maven? I could also do it by including a hard copy of the test jar, but I'd like to be able to get the latest version from the enterprise repo; or by creating a local library and matching Eclipse variable, but I'd like the other developers to be able to check out the project and get moving without having to do a bunch of pre-setup on their workstations.