On Mon, May 25, 2009 at 11:38, j_ri <jochen.riedlin...@l-bank.de> wrote:

> another question I have is the follwing:
> why does maven put all transitive dependencies in the compile classpath? it
> is best practise to have all jars I really depend on for my compilation as
> direct dependency in my pom. why don't force this and just put the direct
> dependencies in the compile classpath and pass the transitive ones "only" to
> the other tasks (packaging, etc.)?

A: provides class Foo {}

B: provides function getTheFoo() -> Foo
B: has a compile time dependency on A

C: has a compile-time dependency on B
C: calls getTheFoo(), which returns a... oops.

B can use types form A in its public interface. Do we really want to
force all C's to know which of B's dependencies appear in its public
interface? Or do all B's document which dependencies they "re-export",
i.e. which should be considered transitive, and which not?

Actually, that last idea, might not be so bad...

// ben

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to