Hum... You are right... I think my problem is due to the fact that the
provided scope is not transitive.  My case is that projectA depends on
projectB which depends on servlet-api (provided scope).  Tests on
projectB needing servlet-api pass but not those in projectA that
indirectly uses servlet-api via some projectB classes.

I think I will have to redeclare that dependency in projectA too :-(
unless there is a way to declare multiple scope for a dependency...

Thanks

Guillaume

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
McClanahan
Sent: Thursday, December 14, 2006 2:29 PM
To: Maven Users List
Subject: Re: test vs provided dependency scopes

On 12/14/06, Guillaume Duchesneau <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
>
>
> I am having problems setting my project dependencies.  I have a JAR
> project that needs javax.servlet/servlet-api/2.4.  My first idea was
to
> set its scope to provided since this jar will end up in a servlet
> container and the servlet api will be provided by the container.  The
> problem I have is that my JUnits needs this dependency to run too.  So
I
> would need both provided and test scopes for that dependency.  But I
do
> not see any way to tell that the Maven.  Am I missing something?
> Anybody can help?


In my experience, dependencies that you mark "provided" (as you should
do
with something like the servlet API) are automatically added to the test
classpath as well.

Craig

Thanks!
>
>
>
> Guillaume
>
>
>

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

Reply via email to