I am not sure, but I think it is possible with maven when
using profiles. In profiles you can define properties.
These properties can be used in in your dependancies to
refer to the actual dependancy.
In your profile you have something like
<profiles>
<profile>
<id>useY</id>
<properties>
<profiled.group.id>groupY</profiled.group.id>
<profiled.artifact.id>artifactY</profiled.artifact.id>
<profiled.version>versionY</profiled.version>
</properties>
</profile>
<profile>
<id>useZ</id>
<properties>
<profiled.group.id>groupZ</profiled.group.id>
<profiled.artifact.id>artifactZ</profiled.artifact.id>
<profiled.version>versionZ</profiled.version>
</properties>
</profile>
</profiles>
In your pom you have.
<dependency>
<groupId>${profiled.group.id}</groupId>
<artifactId>${profiled.artifact.id}</artifactId>
<version>${profiled.version}</version>
<scope>compile</scope>
</dependency>
Hope this helps.
Kind regards,
Minto van der Sluis
PS. I have not tried this. It just came to my mind. I am not
even sure if it actually works.
-----Oorspronkelijk bericht-----
Van: Wim Deblauwe [mailto:[EMAIL PROTECTED]
Verzonden: maandag 22 mei 2006 14:10
Aan: Maven Users List
Onderwerp: Re: Maven vs Ivy
I know it does, but it does not support "configurations" of dependencies
like I believe Ivy does. If you have a project X that can either depend on Y
or Z depending on what you like, you would need to declare both dependencies
optional in Maven altough it will not work if you omit both. You need to
choose between Y or Z. This cannot be easily expressed with Maven2.
regards,
Wim
2006/5/22, Geoffrey De Smet <[EMAIL PROTECTED]>:
>
> Maven 2 supports optional dependencies.
>
> You can even exclude non-optional transitive dependencies.
>
> Wim Deblauwe wrote:
> > Interesting, thanks for the link.
> >
> > The only thing that is really helpful in Ivy when looking at this page
> is
> > the fact that you can choose between optional dependencies. I think
> Maven
> > could use such a concept too.
> >
> > regards,
> >
> > Wim
> >
> > 2006/5/22, Jeff Mutonho <[EMAIL PROTECTED]>:
> >>
> >> On 5/22/06, Wim Deblauwe <[EMAIL PROTECTED]> wrote:
> >> > Hi,
> >> >
> >> > I really love Maven, but people in my organisation seem to have
> noticed
> >> Ivy.
> >> > I have not used Ivy, but I really like those nice screenshots. Are
> >> there
> >> any
> >> > things Ivy does that Maven2 currently can't do? One thing I see is
> the
> >> nice
> >> > depencency graph (but hopefully someone will code that during the
> >> Google
> >> > Summer of Code:)).
> >> >
> >> > Any more thoughts on this?
> >> >
> >> > regards,
> >> >
> >> > Wim
> >> >
> >> >
> >>
> >> Could http://jayasoft.org/ivy/doc/m2comparison be of any help ?
> >>
> >> --
> >>
> >>
> >> Jeff Mutonho
> >>
> >> GoogleTalk : ejbengine
> >> Skype : ejbengine
> >> Registered Linux user number 366042
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
>
> --
> With kind regards,
> Geoffrey De Smet
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
DISCLAIMER
De informatie in deze e-mail is vertrouwelijk en uitsluitend bestemd voor de
geadresseerde. Indien u niet de geadresseerde bent, wordt u er hierbij op
gewezen, dat u geen recht heeft kennis te nemen van de rest van deze e-mail,
deze te gebruiken, te kopiƫren of te verstrekken aan andere personen dan de
geadresseerde. Indien u deze e-mail abusievelijk hebt ontvangen, brengt u dan
alstublieft de afzender op de hoogte, waarbij u bij deze gevraagd wordt het
originele bericht te vernietigen. Politie Amsterdam-Amstelland is niet
verantwoordelijk voor de inhoud van deze e-mail en wijst iedere
aansprakelijkheid af voor en/of in verband met alle gevolgen en/of schade van
een onjuiste of onvolledige verzending ervan. Tenzij uitdrukkelijk het
tegendeel blijkt, kunnen aan dit bericht geen rechten worden ontleend. Het
gebruik van Internet e-mail brengt zekere risicos met zich. Daarom wordt iedere
aansprakelijkheid voor het gebruik van dit medium door de Politie
Amsterdam-Amstelland van de hand gewezen.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]