You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by nicolas de loof <ni...@gmail.com> on 2007/06/04 17:25:30 UTC

transitive "provided" dependency

Hello,

My POM declares a dependency on a library that itself has dependency on JEE
apis (jca, jms) declared as "provided".
Those dependencies are not set in my classpath by the eclipse plugin,
neither get include during compile.

According to
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html,
provided dependencies should be set as "provided" in the target project.

Did I miss something ?

Re: transitive "provided" dependency

Posted by nicolas de loof <ni...@gmail.com>.
That right,
I don't want those javax.* jars to be bundled in my war.
according to maven doc :
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html,

It is expected to be transitive anyway.


2007/6/4, Jo Vandermeeren <jo...@gmail.com>:
>
> Hi Nicolas,
>
> Apparently you have indeed missed a bit ;)
>
> The URL you pasted mentions:
> *provided* - this is much like compile, but indicates you expect the JDK
> or
> a container to provide it. It is only available on the compilation
> classpath, and is not transitive.
>
> This means that they were needed to compile the project on which your
> project depends, but are expected to be provided by the environment in
> which
> the code is going to be executed.
> You don't want the dependency in your war/ear, neither do you want to
> force
> them on dependent projects.
>
> Cheers
> Jo
>
> On 6/4/07, nicolas de loof <ni...@gmail.com> wrote:
> >
> > Hello,
> >
> > My POM declares a dependency on a library that itself has dependency on
> > JEE
> > apis (jca, jms) declared as "provided".
> > Those dependencies are not set in my classpath by the eclipse plugin,
> > neither get include during compile.
> >
> > According to
> >
> >
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
> > ,
> > provided dependencies should be set as "provided" in the target project.
> >
> > Did I miss something ?
> >
>

Re: transitive "provided" dependency

Posted by Jo Vandermeeren <jo...@gmail.com>.
Hi Nicolas,

Apparently you have indeed missed a bit ;)

The URL you pasted mentions:
*provided* - this is much like compile, but indicates you expect the JDK or
a container to provide it. It is only available on the compilation
classpath, and is not transitive.

This means that they were needed to compile the project on which your
project depends, but are expected to be provided by the environment in which
the code is going to be executed.
You don't want the dependency in your war/ear, neither do you want to force
them on dependent projects.

Cheers
Jo

On 6/4/07, nicolas de loof <ni...@gmail.com> wrote:
>
> Hello,
>
> My POM declares a dependency on a library that itself has dependency on
> JEE
> apis (jca, jms) declared as "provided".
> Those dependencies are not set in my classpath by the eclipse plugin,
> neither get include during compile.
>
> According to
>
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
> ,
> provided dependencies should be set as "provided" in the target project.
>
> Did I miss something ?
>