Re: Re: Re: Dependency scopes

2006-08-30 Thread ceki
Thanks!


















"Martijn Dashorst" <[EMAIL PROTECTED]>
 
 
30.08.2006 16:17 
Please respond to
"Maven Users List" 



To
"Maven Users List" 
cc

Subject
Re: Re: Re: Dependency scopes



 Reviewed by Category 


Yes, but "runtime classpath" != "runtime scope"

runtime classpath == union(compile, runtime scope)

Martijn

On 8/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> So, this means that war and ear plug-ins reference the runtime classpath
> instead of say compile or test. Correct?
>
> "Martijn Dashorst" <[EMAIL PROTECTED]> wrote on 30.08.2006
> 15:37:56:
>
> > No, but maven is also used to create war, ear and other distribution
> > packages. These packages need those actual runtime dependencies inside
> > them.
> >
> > So for testing I need junit, but not at runtime -> test scope
> > For testing I may not have a need for oracle-jdbc (using hsqldb for
> > unittests), but at runtime I will (if deploying on an oracle database)
> > -> runtime scope.
> >
> > For testing I need the interfaces for the servlet api, but those
> > interfaces are available at runtiime in the tomcat server for my web
> > application. So the servlet api JAR (javax.servlet-2.3.jar) is needed
> > for compile *and* test, but doesn't need to go into the WAR archive ->
> > provided scope.
> >
> > hth.
> >
> > Martijn
>
>
>  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.
> *
>
>


-- 
Download Wicket 1.2.2 now! New Ajax components: Tree, TreeTable and 
ModalWindow
-- http://wicketframework.org

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




 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.
*


Re: Re: Re: Dependency scopes

2006-08-30 Thread Martijn Dashorst

Yes, but "runtime classpath" != "runtime scope"

runtime classpath == union(compile, runtime scope)

Martijn

On 8/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

So, this means that war and ear plug-ins reference the runtime classpath
instead of say compile or test. Correct?

"Martijn Dashorst" <[EMAIL PROTECTED]> wrote on 30.08.2006
15:37:56:

> No, but maven is also used to create war, ear and other distribution
> packages. These packages need those actual runtime dependencies inside
> them.
>
> So for testing I need junit, but not at runtime -> test scope
> For testing I may not have a need for oracle-jdbc (using hsqldb for
> unittests), but at runtime I will (if deploying on an oracle database)
> -> runtime scope.
>
> For testing I need the interfaces for the servlet api, but those
> interfaces are available at runtiime in the tomcat server for my web
> application. So the servlet api JAR (javax.servlet-2.3.jar) is needed
> for compile *and* test, but doesn't need to go into the WAR archive ->
> provided scope.
>
> hth.
>
> Martijn


 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.
*





--
Download Wicket 1.2.2 now! New Ajax components: Tree, TreeTable and ModalWindow
-- http://wicketframework.org

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



Re: Re: Dependency scopes

2006-08-30 Thread ceki
So, this means that war and ear plug-ins reference the runtime classpath 
instead of say compile or test. Correct?

"Martijn Dashorst" <[EMAIL PROTECTED]> wrote on 30.08.2006 
15:37:56:

> No, but maven is also used to create war, ear and other distribution
> packages. These packages need those actual runtime dependencies inside
> them.
> 
> So for testing I need junit, but not at runtime -> test scope
> For testing I may not have a need for oracle-jdbc (using hsqldb for
> unittests), but at runtime I will (if deploying on an oracle database)
> -> runtime scope.
> 
> For testing I need the interfaces for the servlet api, but those
> interfaces are available at runtiime in the tomcat server for my web
> application. So the servlet api JAR (javax.servlet-2.3.jar) is needed
> for compile *and* test, but doesn't need to go into the WAR archive ->
> provided scope.
> 
> hth.
> 
> Martijn


 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.
*


Re: Re: Dependency scopes

2006-08-30 Thread Martijn Dashorst

No, but maven is also used to create war, ear and other distribution
packages. These packages need those actual runtime dependencies inside
them.

So for testing I need junit, but not at runtime -> test scope
For testing I may not have a need for oracle-jdbc (using hsqldb for
unittests), but at runtime I will (if deploying on an oracle database)
-> runtime scope.

For testing I need the interfaces for the servlet api, but those
interfaces are available at runtiime in the tomcat server for my web
application. So the servlet api JAR (javax.servlet-2.3.jar) is needed
for compile *and* test, but doesn't need to go into the WAR archive ->
provided scope.

hth.

Martijn

On 8/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> On 8/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > The difference between the runtime and test scopes is also not very
> > clear to me.

"Nick Veys" <[EMAIL PROTECTED]> wrote on 17.08.2006 06:16:40:

> This was already answered, but the test dependencies aren't needed for
> "normal" runtime, so they are left out.  It allows you to pull in a
> test harness, or mock libraries during your tests but leave that out
> for "real" execution or packaging.

While I understand that certain libs may be required at compile time
but not compile time, I don't see what "normal" runtime means in terms
of Maven. Maven is a build system, it does not execute your
applications, so how can it have a runtime classpath? There is no
such thing as runtime Maven or is there?


 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.
*





--
Download Wicket 1.2.2 now! New Ajax components: Tree, TreeTable and ModalWindow
-- http://wicketframework.org

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



Re: Dependency scopes

2006-08-30 Thread ceki
> On 8/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> 
> > The difference between the runtime and test scopes is also not very
> > clear to me.

"Nick Veys" <[EMAIL PROTECTED]> wrote on 17.08.2006 06:16:40:

> This was already answered, but the test dependencies aren't needed for
> "normal" runtime, so they are left out.  It allows you to pull in a
> test harness, or mock libraries during your tests but leave that out
> for "real" execution or packaging.

While I understand that certain libs may be required at compile time
but not compile time, I don't see what "normal" runtime means in terms
of Maven. Maven is a build system, it does not execute your
applications, so how can it have a runtime classpath? There is no
such thing as runtime Maven or is there? 


 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.
*


Re: Dependency scopes

2006-08-17 Thread franz see

> Nick,
> 
> I very much appreciate your response. I wish the article of reference
> on subject, namely, "Introduction to the Dependency Mechanism" was
> somewhat more precise. Perhaps the maintainers of the document could
> have another look at it. Is filing a bug report appropriate?

Good day to you, ceki-3,

You can file one under MNG - Documentation: Introductions ([1]) ^_^

[1]
http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&mode=hide&pid=10500&sorter/order=DESC&sorter/field=priority&resolution=-1&component=11872

Cheers, 
Franz
-- 
View this message in context: 
http://www.nabble.com/Dependency-scopes-tf2109159.html#a5860766
Sent from the Maven - Users forum at Nabble.com.


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



Re: Dependency scopes

2006-08-17 Thread Nick Veys

On 8/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Nick,

I very much appreciate your response. I wish the article of reference
on subject, namely, "Introduction to the Dependency Mechanism" was
somewhat more precise. Perhaps the maintainers of the document could
have another look at it. Is filing a bug report appropriate?


As far as I know that's how they operate, yes.

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



Re: Dependency scopes

2006-08-17 Thread ceki
Nick,

I very much appreciate your response. I wish the article of reference
on subject, namely, "Introduction to the Dependency Mechanism" was
somewhat more precise. Perhaps the maintainers of the document could
have another look at it. Is filing a bug report appropriate?


"Nick Veys" <[EMAIL PROTECTED]> wrote on 17.08.2006 06:16:40:

> On 8/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > 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.
> 
> Think of Runtime as somewhat of an optimization for the build process.
>  The jar itself is not needed to compile the code as it has no direct
> dependency on it, though the code itself still needs this jar to
> execute, as such it will travel along transitively in case it is
> needed down the line, and will also be included in the test scope as
> it may be called upon since the code has a runtime dependency on it.
> 
> > 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 documentation may be slightly wrong, as you experienced the
> provided scope jars are available to tests (at least in my
> experience), though I believe only that local project tests, as you
> have no transitivity (I may be wrong here, corrections?).  Provided is
> very much like compile w/o transitivity.  It is assumed that your
> container or system will provide this jar when needed.
> 
> > The difference between the runtime and test scopes is also not very
> > clear to me.
> 
> This was already answered, but the test dependencies aren't needed for
> "normal" runtime, so they are left out.  It allows you to pull in a
> test harness, or mock libraries during your tests but leave that out
> for "real" execution or packaging.
> 
> > 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.
> 
> I'm guessing it's trying to tell you the precidence of dependencies
> when the same dependency is referenced in multiple scopes in one
> project, but you're right, the preceeding paragraph is not exactly
> clear in what it is talking about.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


 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.
*


Re: Dependency scopes

2006-08-16 Thread Nick Veys

On 8/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

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.


Think of Runtime as somewhat of an optimization for the build process.
The jar itself is not needed to compile the code as it has no direct
dependency on it, though the code itself still needs this jar to
execute, as such it will travel along transitively in case it is
needed down the line, and will also be included in the test scope as
it may be called upon since the code has a runtime dependency on it.


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 documentation may be slightly wrong, as you experienced the
provided scope jars are available to tests (at least in my
experience), though I believe only that local project tests, as you
have no transitivity (I may be wrong here, corrections?).  Provided is
very much like compile w/o transitivity.  It is assumed that your
container or system will provide this jar when needed.


The difference between the runtime and test scopes is also not very
clear to me.


This was already answered, but the test dependencies aren't needed for
"normal" runtime, so they are left out.  It allows you to pull in a
test harness, or mock libraries during your tests but leave that out
for "real" execution or packaging.


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.


I'm guessing it's trying to tell you the precidence of dependencies
when the same dependency is referenced in multiple scopes in one
project, but you're right, the preceeding paragraph is not exactly
clear in what it is talking about.

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



Re: Dependency scopes

2006-08-16 Thread ceki
Mike, thank you for taking the time to respond. My question had
several parts and your response relates to the difference between
runtime scope and the test scope. I wonder if someone would care to
respond to the remaining parts.

Mike Perham <[EMAIL PROTECTED]> wrote on 15.08.2006 18:04:17:

> 
> 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.
> >
> > 
> > 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.
> > 
> >
> > 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]



Re: Dependency scopes

2006-08-15 Thread Mike Perham




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.
>
> 
> 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.
> 
>
> 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]
>

RE: dependency scopes

2005-12-04 Thread Brian E. Fox
"Nice. But can you give me an example of need and use? At first sight,
this goes for the entire java.* API. And if it is provided, why mention
it?" 
 
An example is the servlet.jar. You need it to compile, but don't want it
packaged in your war because the servlet container will "provide" it
automatically. The Java API isn't relevant because it's automatically
available to the compiler and at runtime. We're talking about other
dependancies here.
 

* runtime - this scope indicates that the dependency is not
required for compilation, but is for execution. It is in the
runtime and
test classpaths, but not the compile classpath.



The runtime classpath? What is that? Is there a "run" goal? I understand
you need things that are required for execution are needed during test,
but than what is the difference with the test scope?
 
Things on the runtime scope are needed to run your artifact, but not to
compile it. 
 


* test - this scope indicates that the dependency is not
required
for normal use of the application, and is only available for the
test
compilation and execution phases.



This I understand.



* system - this scope is similar to provided except that you
have
to provide the JAR which contains it explicitly. The artifact is
always
available and is not looked up in a repository.



Nice. But can you please give me an example, because I don't have the
faintest idea what you are talking about. 
Don't know either. Copied it from the url, but I haven't found a need
for it yet. 




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.



Ok. Scopes form an algebra, and the operation in this Caleigh table
looks a bit weird, but anyway. It is the sentence above that is a
little complicated for me
"a dependency is set to the scope in the left column, dependencies with
the scope across the top row will resul ..." you lost me.

To clear this up, let's make some definitions:
The current project is the project whose POM we are editing.
The dependency is a project the user project directly depends on. This
dependency is labelled (2).
A user project is a project for which the current project is a direct
depency. This dependency is labelled (1). Consequentially, a user
project has an indirect depency on the dependency.

So:
user project <--(1)-- current project <--(2)--- dependency

Now, we are talking of the result of combining the scope of (1) with
(2), right? Now, in
, is 1 in the left column, and 2 in the top row, or is it
the other way around?  Yes, top. 



Next, what is the  tag in a dependency declaration about?
 It is supposed to mean that there may be a dependancy depending on how
it's used. Maybe a project has a need for struts or hibernate but not
all the time, perhaps depending on configuration. 


And finally, there is talk here and there about non-deterministic
version specifications (e.g., [1.0.0), or 1.0.0,2.0.0. Is this active in
maven 2.0? Is there any real documentation?
 It is active, it's documented somewhere but I don't remember where. You
are essentially specifying a range of allowable values. The way maven
picks the actual version when multiples are specified is a little
complicated. Search the archives cause I know it's been covered. 












From: ir. ing. Jan Dockx [mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 04, 2005 4:57 AM
To: Maven Users List
Subject: dependency scopes


I *really* don't fully grasp dependency scopes. Could somebody
in the
know please have a look at

and
correct some points?

Or at least, give a 1-sentence use case (example) for each of
the
scopes?

Until now, I found the following scopes mentioned in docs:

* compile
* test
* runtime
* provided
* system

and the  tag


Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85 
B-2660 Hoboken 
Tel: +32 3 448.33.38 
Fax: +32 3 448.32.66 

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://ww

Re: dependency scopes

2005-12-04 Thread ir. ing. Jan Dockx
Ok, we have contact :-).

On 4 Dec 2005, at 17:20, Brian E. Fox wrote:

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

Of course, but …

Dependency scope is used to limit the transitivity of a depedency, and
also to affect the classpath used for various build tasks.

There are 5 scopes available:

*	compile - this is the default scope, used if none is specified.
Compile dependencies are available in all classpaths.
*	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.

Nice. But can you give me an example of need and use? At first sight, this goes for the entire java.* API. And if it is provided, why mention it?

*	runtime - this scope indicates that the dependency is not
required for compilation, but is for execution. It is in the runtime and
test classpaths, but not the compile classpath.

The runtime classpath? What is that? Is there a "run" goal? I understand you need things that are required for execution are needed during test, but than what is the difference with the test scope?

*	test - this scope indicates that the dependency is not required
for normal use of the application, and is only available for the test
compilation and execution phases.

This I understand.

*	system - this scope is similar to provided except that you have
to provide the JAR which contains it explicitly. The artifact is always
available and is not looked up in a repository.

Nice. But can you please give me an example, because I don't have the faintest idea what you are talking about.

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.

Ok. Scopes form an algebra, and the operation in this Caleigh table looks a bit weird, but anyway. It is the sentence above that is a little complicated for me
"a dependency is set to the scope in the left column, dependencies with the scope across the top row will resul …" you lost me.

To clear this up, let's make some definitions:
 The current project is the project whose POM we are editing.
The dependency is a project the user project directly depends on. This dependency is labelled (2).
A user project is a project for which the current project is a direct depency.  This dependency is labelled (1). Consequentially, a user project has an indirect depency on the dependency.

So:
user project <--(1)-- current project <--(2)--- dependency

Now,  we are talking of the result of combining the scope of (1) with (2), right? Now, in , is 1 in the left column, and 2 in the top row, or is it the other way around?



Next, what is the  tag in a dependency declaration about?



And finally, there is talk here and there about non-deterministic version specifications (e.g., [1.0.0), or 1.0.0,2.0.0.  Is this active in maven 2.0? Is there any real documentation?







From: ir. ing. Jan Dockx [mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 04, 2005 4:57 AM
To: Maven Users List
Subject: dependency scopes


I *really* don't fully grasp dependency scopes. Could somebody in the
know please have a look at
 and
correct some points?

Or at least, give a 1-sentence use case (example) for each of the
scopes?

Until now, I found the following scopes mentioned in docs:

* compile
* test
* runtime
* provided
* system

and the  tag


Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85 
B-2660 Hoboken 
Tel: +32 3 448.33.38 
Fax: +32 3 448.32.66 

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/

Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85 
B-2660 Hoboken 
Tel: +32 3 448.33.38 
Fax: +32 3 448.32.66 

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/


smime.p7s
Description: S/MIME cryptographic signature


RE: dependency scopes

2005-12-04 Thread Brian E. Fox
http://maven.apache.org/guides/introduction/introduction-to-dependency-m
echanism.html
 
  

Dependency scope is used to limit the transitivity of a depedency, and
also to affect the classpath used for various build tasks.

There are 5 scopes available:

*   compile - this is the default scope, used if none is specified.
Compile dependencies are available in all classpaths.
*   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.
*   runtime - this scope indicates that the dependency is not
required for compilation, but is for execution. It is in the runtime and
test classpaths, but not the compile classpath.
*   test - this scope indicates that the dependency is not required
for normal use of the application, and is only available for the test
compilation and execution phases.
*   system - this scope is similar to provided except that you have
to provide the JAR which contains it explicitly. The artifact is always
available and is not looked up in a repository.

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.

 




From: ir. ing. Jan Dockx [mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 04, 2005 4:57 AM
To: Maven Users List
Subject: dependency scopes


I *really* don't fully grasp dependency scopes. Could somebody in the
know please have a look at
 and
correct some points?

Or at least, give a 1-sentence use case (example) for each of the
scopes?

Until now, I found the following scopes mentioned in docs:

* compile
* test
* runtime
* provided
* system

and the  tag


Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85 
B-2660 Hoboken 
Tel: +32 3 448.33.38 
Fax: +32 3 448.32.66 

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/


Re: dependency scopes

2005-11-28 Thread Geoffrey
I think I have a little bit of a similar problem (need for an assembly 
scope) in m2:

I have a dependency on acegi-security 0.9.0 (and spring 1.2.6),
but acegi has many dependencies needed to compile, but that I don't need 
at runtime because I don't use all of acegi's classes.


Exclusions works, but the list is very long and I need to set it again 
for acegi-tiger. If I ever would need one of those libraries, I can add 
it with a runtime scope, so is it possible to say "exclude all"?



ir. ing. Jan Dockx wrote:
/I *don't* understand the dependency scope mechanism. Therefor, I 
created a page in the Wiki to get this sorted out.


/
/
In the first version of this page, I am trying to make sense of 
different sources about the topic. This means the information here is 
not correct per definition! The intention of this page is to get it 
correct and clear, so *please*, if you do know something about 
dependency scopes, change the nonsense there /



/.


I am mainly doing this in the Wiki, because I believe a matrix is in 
order to clarify some things, and that is not simple in a mail.

/


Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25
_
http://www.peopleware.be/
http://www.mobileware.be/_



--
With kind regards,
Geoffrey De Smet


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