Ole Ersoy a écrit :
Let me see if I get this on a more general level.
We have multiple projects.
Each project has dependencies.
When those projects are built, the dependencies
are included with the build.
So when we combine all these projects we have
duplicated dependencies on the classpath or at least
duplicate dependency jars in the main build...because
each sub project has overlapping dependencies.
If my understanding is correct, then we should be
able to resolve this by setting the dependency scope
attribute to "compile" on the subprojects, and
list all the dependencies in the main ADS pom, with
scope set to "runtime".
Cheers,
- Ole
There is something I don't get. Let me clarify :
if we have a parent project and N sub-project, which all use a common
dependency (let say commons-collection, or, in our cas, ldap-shared),
then this dependency is to be declared and use at compile time *and* at
runtime. So it could be only declared in the parent project, all the
sub-project will inherit from their common parent.
It's not exactly the same thing with some other kind of dependency like
junit, which will be usefull *only* when compiling the project.
In our case, I don't think that shared-ldap dependency can be used only
with a compile scope (unless you just want to test the compilation,
because without this jar, trust me, the server will simply fail very fast :)
There should be some other problem, I think. Sadly, I'm not very aware
of all those OSGI stuff, so I can't help a lot, but I don't think that
maven iytself is the problem. It seems to be much more a problem of
project structure, IMHO.
Emmanuel