test scope should inherit provided scope?

2006-10-13 Thread pjungwir

Hello,

I noticed that when I run my tests, the classpath includes all my
provided-scope dependencies. The docs online don't say they should be there,
but I guess it makes sense, right? Provided scope means I need them to run,
but they'll be available after I deploy. Therefore maven needs to provide
them when I'm just running tests. So therefore I have a question:

The docs here have a chart about transitive dependencies:

http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

According to this chart, if I rely on library A with a test scope, and A
relies on B with a provided scope, I won't get B at all. Is that right?
Don't I need B to run my tests? If my test classpath includes immediate
provided-scope dependencies, shouldn't it include mediate ones?

Thanks,
Paul


-- 
View this message in context: 
http://www.nabble.com/test-scope-should-inherit-provided-scope--tf2435171.html#a6790293
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: test scope should inherit provided scope?

2006-10-13 Thread pjungwir

I rigged up a test. The chart is accurate, but the behavior seems wrong to
me. Could someone please explain why dropping that dependency is the right
thing to do?

Just to repeat, here is the setup:

Project depends on A with test scope.
A depends on B with provided scope.

When I run A's tests, I have B in my classpath.
When I run Project's tests, I don't have B in my classpath.

Is there any use case when it's good not to have B? Since we're still just
running unit tests, we can't get B otherwise than from maven.

Thanks,
Paul

-- 
View this message in context: 
http://www.nabble.com/test-scope-should-inherit-provided-scope--tf2435171.html#a6790794
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]