With M3 (which we’ve been using since it’s release), running “gradle cleanEclipse eclipse”, going to Eclipse and refreshing the project, then looking at the Referenced Libraries, I see 29 JARs.
With M8/M9 (which I’ve been working to upgrade us to), running “gradle cleanEclipse eclipse”, going to Eclipse and refreshing the project, then looking at the Referenced Libraries, I see 18 JARs.
It seems like not all of the transitive dependencies are being included, though some are.
From the command-line everything works fine – no compilation issues & all tests pass.
Are you experiencing any issues in the IDE? Have you verified that artifacts are missing in the IDE that are present in a configuration? You can print all artifacts of a configuration like so:
task debug << {
configurations.testRuntime.each { println it }
}
Yes, I am experiencing issues within Eclipse (STS actually). In my Markers view, under Java Problems, I have the following:
The project was not built since its build path is incomplete. Cannot find the class file for org.springframework.context.ConfigurableApplicationContext. Fix the build path then try building this project
The type org.springframework.context.ConfigurableApplicationContext cannot be resolved. It is indirectly referenced from required .class files
The project in question has a compile dependency on spring-test. There are no other Spring JARs in the project’s Referenced Libraries within Eclipse/STS.
Executing the “debug” snippet above shows the same 18 JARs that are in the project’s Referenced Libraries. However, if I execute the same snippet with M3, I see 29 JARs.
Can you provide a simple build script with just the debug task that reproduces this problem? This will need to include the repositories and dependencies sections from your build.
Once again, this turned out to be a “phantom” problem of my own making. In the process of creating the simplest possible project to reproduce the issue, I figured out what was going on. It wasn’t an M3 vs. M9 issue at all.
In my current, M3, build there is an unnecessary ‘compile’ dependency on spring-security; I have no idea how that got in there. In the process of upgrading to M9, one of the first things I did was clean up my scripts a bit; one of the tasks being to remove that unnecessary dependency (I should have done that separately). So, that left the project I was having an issue with having a ‘compile’ dependency on spring-test. As spring-test depends on the other spring-* JARs, I thought everything should have been fine.
As I was trying to figure out why the other spring-* JARs were not in the STS project’s Referenced Libraries, I looked at the Ivy descriptors in my cache for both spring-security & spring-test. Finally, I noticed that even though both have dependencies on the other spring-* JARs, sprint-security uses these configurations: “compile->compile(),master();runtime->runtime()", while spring-test just uses these: "compile->compile(),master(*)”.
So, I added a ‘runtime’ dependency on spring-context to my problematic project, and all is well. Sorry for the false alarm. Thanks again for the assistance.