The problem I see with conditional dependencies is that they define the
dependencies that Maven needs in order to build/test the artifact.

So if I do a build on java6, my conditional dependencies will exclude
javax.activation...

I assume the Release/deploy plugins will upload the effective pom for my
build environment, which does not include javax.activation...

Now you come along and depend on my artifact, but are building with java5...
so you do not receive the conditional dependency.

On the other hand if the release/deploy plugins upload the pom and it's
profile definitions, Maven is going to have to re-detect the profile
activation to determine the transitive dependencies (Which I don't thinkk it
does)

-Stephen

On Feb 5, 2008 8:20 AM, SlinnHawkins, Jon (ELS-CAM) <
[EMAIL PROTECTED]> wrote:

> Hi Jorg
>
> Yeah just set up profiles for Java5 and java6 each specifying the unique
> dependencies for the jdk.
>
> Jon
>
> -----Original Message-----
> From: Joerg Hohwiller [mailto:[EMAIL PROTECTED]
> Sent: 04 February 2008 21:13
> To: Maven Users List
> Subject: conditional dependencies
>
> Hi there,
>
> I am using conditional dependencies in the form that I use variables in
> the dependencies and profiles to set these variables.
>
> Now I currently wonder what to do if a dependency is only required under
> specific situations. E.g. stax or jsr250 is included in java6 while you
> need dependencies on external artifacts for java5.
> Has someone experience with that?
> Is it best to use a variable for the scope and set it to "provided" for
> java6?
> Or is it possible to add a dependency into the profile section?
>
> Thanks
>   Jörg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> This email is from Elsevier Limited, a company registered in England and
> Wales with company number 1982084,
> whose registered office is The Boulevard, Langford Lane, Kidlington,
> Oxford, OX5 1GB, United Kingdom.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to