I am using spring boot and when I want to JUnit test from within Eclipse or launch the “main” class in my project then the class path isn’t what I expect.
When using spring boot I end up with about 75 jars in the path. The list of jars under “Project and External Dependencies” in the Package Explorer for my project looks as it should. I.e. all my needed JARs are listed.
However when I select my main class and do “Run As” then the generated class path used by Eclipse is lacking 5 JARs. I check the “Command line” in the Properties dialog for the launching in the Debug perspective.
I suspect that when Eclipse launches it will “ask” the Gradle plugin for the class path and I suppose that by some reason not all the JARs are returned from the Gradle plugin.
All other settings in the “Command line” looks OK.
When I re-order the dependencies in the build.grade for the project then there some other JARs that will be missing.
Alas I can’t repeat this issue consistently. Not all my projects have this issue.
But except for some differences in the dependencies there isn’t any differences.
4 out of 7 projects have this issue.
I have checked the Error log in Eclipse, it is empty.
I am using Eclipse Mars.2, Buildship 220.127.116.11.
jdk1.8.0_77, OS X El Cap. Gradle 2.12 with the wrapper.
I have also tested with Buildship 18.104.22.168. Same issue