Re: Conditional dependencies in M2

2006-04-25 Thread Carlos Sanchez
optional dependencies are set with 
They are not transitive, so if you decide to use that from other
project you need to explicitly add jdom, and that will bring all jdom
transitive dependencies

On 4/25/06, Clifton Craig <[EMAIL PROTECTED]> wrote:
> On Monday 24 April 2006 3:51 pm, Mike Perham wrote:
> > test is the closest thing I can think of.  Test dependencies
> > are not transitive so you need to declare them in each module.
>
> Right, I saw that but didn't know if the scoped would allow transitive
> behaviour. I also don't know much of other available scopes. So let's say I
> have a project, MyUtils, with a dependency on XMLUnit scoped to test and
> another optional dependency on JDOM. JDOM is only necessary if you want to
> use XPath features wrapped by MyUtils and provided by JDOM. Now I want to
> include Myutils in another project but I only want to use some collections
> classes also found in MyUtils and have no need for the wrapping of JDOM. How
> do I set the POM for MyUtils such that JDOM is not transitively included?
> More importantly how do I set it such that JDOM is automatically included
> with another project that does want to use the wrapped JDOM functionality
> from MyUtils without changing the POM for either project? Is profiles the
> answer?
>
> ---
> Clifton C. Craig, Software Engineer
> Intelligent Computer Systems -  A Division of GBG
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
 -- The Princess Bride

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



Re: Conditional dependencies in M2

2006-04-25 Thread Alexandre Poitras
I think you should specify some of the MyUtils dependencies as being
optionnal. I don't really know how it works but I know this is what
you are looking for. Maybe others can help you here.

On 4/25/06, Clifton Craig <[EMAIL PROTECTED]> wrote:
> On Monday 24 April 2006 3:51 pm, Mike Perham wrote:
> > test is the closest thing I can think of.  Test dependencies
> > are not transitive so you need to declare them in each module.
>
> Right, I saw that but didn't know if the scoped would allow transitive
> behaviour. I also don't know much of other available scopes. So let's say I
> have a project, MyUtils, with a dependency on XMLUnit scoped to test and
> another optional dependency on JDOM. JDOM is only necessary if you want to
> use XPath features wrapped by MyUtils and provided by JDOM. Now I want to
> include Myutils in another project but I only want to use some collections
> classes also found in MyUtils and have no need for the wrapping of JDOM. How
> do I set the POM for MyUtils such that JDOM is not transitively included?
> More importantly how do I set it such that JDOM is automatically included
> with another project that does want to use the wrapped JDOM functionality
> from MyUtils without changing the POM for either project? Is profiles the
> answer?
>
> ---
> Clifton C. Craig, Software Engineer
> Intelligent Computer Systems -  A Division of GBG
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Conditional dependencies in M2

2006-04-25 Thread Clifton Craig
On Monday 24 April 2006 3:51 pm, Mike Perham wrote:
> test is the closest thing I can think of.  Test dependencies
> are not transitive so you need to declare them in each module.

Right, I saw that but didn't know if the scoped would allow transitive 
behaviour. I also don't know much of other available scopes. So let's say I 
have a project, MyUtils, with a dependency on XMLUnit scoped to test and 
another optional dependency on JDOM. JDOM is only necessary if you want to 
use XPath features wrapped by MyUtils and provided by JDOM. Now I want to 
include Myutils in another project but I only want to use some collections 
classes also found in MyUtils and have no need for the wrapping of JDOM. How 
do I set the POM for MyUtils such that JDOM is not transitively included? 
More importantly how do I set it such that JDOM is automatically included 
with another project that does want to use the wrapped JDOM functionality 
from MyUtils without changing the POM for either project? Is profiles the 
answer?

--- 
Clifton C. Craig, Software Engineer
Intelligent Computer Systems -  A Division of GBG
[EMAIL PROTECTED]
[EMAIL PROTECTED]

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



RE: Conditional dependencies in M2

2006-04-24 Thread Mike Perham
test is the closest thing I can think of.  Test dependencies are 
not transitive so you need to declare them in each module. 

-Original Message-
From: Clifton Craig [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 24, 2006 2:15 PM
To: users@maven.apache.org
Subject: Conditional dependencies in M2

Hello all,

I am converting from Ant/Ivy to Maven2 and I have a question regarding 
dependencies in Maven2. In Ivy I could define dependencies which would be 
conditionally considered based on my build configuration. for example, I could 
define in a project Foo, a dependency on Bar for all configurations and a 
dependecy on Box for the test configuration of project Foo. Then, another 
project, say Fuzz, could depend on Foo and use either its default configuration 
(which would transitivly bring in Bar but not Box)  or use its test 
configuration (which would transitivly bring in Bar AND Box). How is this done 
in Maven? I read up on profiles and I'm wondering if that's the answer, or if 
there's a more straight foward way of doing the same. Could somebody provide an 
example of a Maven equivalent? Thanx in advance.

---
Clifton C. Craig, Software Engineer
Intelligent Computer Systems -  A Division of GBG [EMAIL PROTECTED] [EMAIL 
PROTECTED]

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



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



Re: Conditional dependencies in M2

2006-04-24 Thread Alexandre Poitras
This is what you are looking for :
http://maven.apache.org/guides/introduction/introduction-to-profiles.html

On 4/24/06, Clifton Craig <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I am converting from Ant/Ivy to Maven2 and I have a question regarding
> dependencies in Maven2. In Ivy I could define dependencies which would be
> conditionally considered based on my build configuration. for example, I
> could define in a project Foo, a dependency on Bar for all configurations and
> a dependecy on Box for the test configuration of project Foo. Then, another
> project, say Fuzz, could depend on Foo and use either its default
> configuration (which would transitivly bring in Bar but not Box)  or use its
> test configuration (which would transitivly bring in Bar AND Box). How is
> this done in Maven? I read up on profiles and I'm wondering if that's the
> answer, or if there's a more straight foward way of doing the same. Could
> somebody provide an example of a Maven equivalent? Thanx in advance.
>
> ---
> Clifton C. Craig, Software Engineer
> Intelligent Computer Systems - A Division of GBG
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Conditional dependencies in M2

2006-04-24 Thread Clifton Craig
Hello all,

I am converting from Ant/Ivy to Maven2 and I have a question regarding 
dependencies in Maven2. In Ivy I could define dependencies which would be 
conditionally considered based on my build configuration. for example, I 
could define in a project Foo, a dependency on Bar for all configurations and 
a dependecy on Box for the test configuration of project Foo. Then, another 
project, say Fuzz, could depend on Foo and use either its default 
configuration (which would transitivly bring in Bar but not Box)  or use its 
test configuration (which would transitivly bring in Bar AND Box). How is 
this done in Maven? I read up on profiles and I'm wondering if that's the 
answer, or if there's a more straight foward way of doing the same. Could 
somebody provide an example of a Maven equivalent? Thanx in advance.

--- 
Clifton C. Craig, Software Engineer
Intelligent Computer Systems -  A Division of GBG
[EMAIL PROTECTED]
[EMAIL PROTECTED]

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