Basically moduleA depends on Spring 3 meanwhile moduleB depends on Spring 1.2.8.
Also moduleA depends on module B and excludes the dependency org.springframework (which is transitive for moduleB).
Using the gradle command line for displaying the dependencies I can confirm that Spring 1.2.8 is being excluded correctly from the point of view of moduleA.
Now when working from Eclipse this does not happen. The moduleA is using in fact classes from Spring 1.2.8 which it causes compile issues.
Is this a known limitation of the plugin?
Thanks
I am using Gradle 2.4 and I have just intalled the Buildship plugin from the Marketplace.
@adammurdoch I have just tried with Gradle 2.5 and the importing of the projects took more time, but the outcome is the same, dependency exclusions are not being honoured. I could replicate this in a project from scratch and upload it here if it helps.
@etiennestuder I have attached to this post a sample of this issue.
As you can see, after importing the multi-project into Eclipse, the moduleA will contain compile errors because it’s using Spring 1.2.8 classes instead of 3.0.0, even though it’s excluded.
I do not see a difference between the screenshots provided by @Rene and @jonathannaguin in terms of dependency versions. Both screenshots also look like the cmd line output shown by Jonathan. Have I missed something?
Also, please note that you need to remove the generated .project files before re-importing, otherwise Buildship does not touch the existing projects (that is intended behavior).
@etiennestuder Yup, I remembered to delete first the .project files before the import.
The different is that I am getting a compile error in ApplicattionA.java because it is not using actually Spring 3, but Spring 1. The screenshot provided by @Rene seems to suggests that he does not have such compile error (unless he had disabled the auto-build setting).
@jonathannaguin: Do you get this even after ‘Project…’ → Clean? @Rene: Can you verify (if not done already) that the libs used in project A are actually Spring 3?
Hm, so two people are importing the exact same project (the one attached by Jonathan), and one Eclipse is fine with it while the other is not. @donat please also import this project from the .zip and let us know the outcome.
@etiennestuder I’ve just tried to clean up all the projects… Sorry, the same… I have also tried to refresh every project several times, and does not help.
@etiennestuder Yup, Gradle Wrapper and no other options. In the next screen, I can confirm that it is using 2.5. Let me know if you need more info from me!
@Rene@etiennestuder I have just noticed that in the Eclipse screenshot that Rene posted the moduleA does not have moduleB as a dependency, or at least it is not listed like in my Eclipse.
good catch. But moduleB is definitely configured as a dependency. also you’re seeing your dependencies summed up in “Project & External Dependencies”. Where does this come from?
@Rene That was created automatically by the plugin… Looking at the code in Github I found this reference to this container: “ClasspathContainer_Label” under CoreMessages.