You could also depend on just one version of a library across all
subprojects.
On Jun 22, 2011, at 3:38 PM, David Gileadi wrote:
This message is to ask if there's any reason why we shouldn't change
the Eclipse plugin to put project classpath entries after library
classpath entries. Here's some background:
I'm trying to use the Eclipse plugin for a rather complex multi-
project build. I've found that Eclipse resolves things in the order
they appear in the .classpath file, and that the Eclipse plugin puts
projects first in that file. So for instance if Project A depends
on some-library-1.0.jar (notice the 1.0) and Project B depends on
both Project A and some-library-2.0.jar (notice the 2.0) then the
Java files in Project B will be compiling against some-
library-1.0.jar (the 1.0 version).
This is really because Eclipse doesn't support exclusions in project
dependencies the way Maven and Gradle do. That is, in Gradle for
Project B you can specify:
dependencies {
compile project(':projectA') { exclude module: 'some-library' }
}
However I believe that in Eclipse there's no equivalent construct--
importing a project imports all its exported classpath entries too.
Changing the Eclipse plugin to put library classpath entries before
project classpath entries would make it so that Eclipse looks in
declared library dependencies before it looks in library
dependencies of imported projects, which I think helps mitigate the
lack of excludes for project imports. I've made the change locally
and it seems to work. What do you think--is there a reason that
making this change is a bad idea?
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email