Runtime - contains things that you don't need at compile but you do need
for your app to actually run.  You might compile against JMS but require
ActiveMQ at runtime (i.e. a JMS engine).
Test - contains test specific classes.  Junit, mocks, a lightweight
database like HSQLDB, etc.

[EMAIL PROTECTED] wrote on 08/15/2006 08:32:26 AM:

> Hello,
>
> I would like to ask a question regarding dependency scopes in
> Maven2. After reading the article "Introduction to the Dependency
> Mechanism" [1], I've got several questions that may have been answered
> previously. I apologize in advance if that is the case.
>
> The said article mentions the notion of "runtime classpath." While I
> can see what compile and test classpaths mean, I fail to understand
> what a runtime classpath is, in particular how it differs from the
> test classpath.
>
> Moreover, the article defines  "provided scope" as follows:
>
>  provided - this is much like compile, but indicates you expect theJDK
>     or a container to provide it.  It is only available on the
compilation
>    classpath, and is not transitive.
>
> However, in a small project I've created to test dependency scopes, it
> seems that a dependency declared with the "provided" scope is
> available when compiling the source, compiling the test cases as well
> as when running them (the test cases). Thus, it looks like the
> provided scope is the same as the compile scope, except that the
> provided scope is not transitive.
>
> The difference between the runtime and test scopes is also not very
> clear to me.
>
> The small table which illustrates the effects of scopes on
> transitivity is not easy to grok. In particular, the explanation
> (quoted below) preceding the table does not define the direction of
> any of the dependencies.
>
> <quote>
> Each of the scopes affects transitive dependencies in different ways,
> as is demonstrated in the table below. If a dependency is set to the
> scope in the left column, dependencies with the scope across the top
> row will result in a dependency in the main project with the scope
> listed at the intersection. If no scope is listed, it means the
> dependency will be omitted.
> </quote>
>
> Your enlightenment would be greatly appreciated,
>
> [1]
> http://maven.apache.org/guides/introduction/introduction-to-
> dependency-mechanism.html
>
>
> ************************ DISCLAIMER ************************
> This message is intended only for use by the person
> to whom it is addressed. It may contain information
> that is privileged and confidential. Its content does
> not constitute a formal commitment by Lombard
> Odier Darier Hentsch Group and any of its affiliates.
> If you are not the intended recipient of this message,
> kindly notify the sender immediately and destroy this
> message. Thank You.
> *****************************************************************
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

Reply via email to