ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Castrianni <Shawn.Castria...@halliburton.com>
Subject RE: multiple artifact confs: wanting AND instead of OR
Date Mon, 27 Jul 2009 22:02:19 GMT
configuration groups and intersections are complimentary.  intersections gives you the ability
to have the following scenario:

module A contains artifacts that support both (windows and linux) platforms AND (debug and
release) types:

art1.dll, conf="windows,release"
art1d.dll, conf="windows,debug"
art1.so, conf="linux,release"
art1d.so, conf="linux,debug"


Then if module B is dependent on module A, B can specify a certain platform and a certain
release type with an intersection:

A->B  (windows)  delivers both art1.dll and art1d.dll
A->B  (linux)    delivers both art1.so and art1d.so
A->B  (windows+debug)  delivers only art1d.dll since it is the only artifact that exists
in BOTH the windows configuration and the debug configuration
A->B  (windows+release)  delivers only art1.dll since it is the only artifact that exists
in BOTH the windows configuration and the release configuration
A->B  (linux+debug)  delivers only art1d.so since it is the only artifact that exists in
BOTH the linux configuration and the debug configuration
A->B  (linux+release)  delivers only art1d.so since it is the only artifact that exists
in BOTH the linux configuration and the release configuration



What you seem to want to do is to specify that an artifact is only valid within an intersection.
 So I think you are wanting to use the "+" notation in the artifact section of the ivy.xml
instead of the dependencies section like I requested.  Something like:

art1.dll, conf="windows+release"
art1d.dll, conf="windows+debug"
art1.so, conf="linux+release"
art1d.so, conf="linux+debug"


I don't see any benefit to this as it seems to be the same as just another configuration name.
 Maybe if you elaborated on why you need this?

---
Shawn Castrianni


-----Original Message-----
From: Garima Bathla [mailto:garima.bathla@gmail.com] 
Sent: Monday, July 27, 2009 4:47 PM
To: ivy-user@ant.apache.org
Subject: Re: multiple artifact confs: wanting AND instead of OR

Shawn, thanks. I think you're on the right track here. Let me make sure I'm
not confused in my understanding: configuration intersections (JIRA
IVY-1093) are NOT to be confused with configuration groups (JIRA IVY-1097).

Actually, it sounds like configuration intersections may be precisely what
I'm looking for. Can you provide an example of its usage? I'm guessing you
might have something like:
<dependency ... conf="default->dachshund+persian" />

I'll take your word that this has been implemented in 2.1.0-rc2, even though
the JIRA issue hasn't been resolved yet.

I had taken a look at configuration groups and it didn't seem like that
would help. To use the example on
https://issues.apache.org/jira/browse/IVY-1097, take the following
publication artifact:
               <artifact name="art51A" type="jar"
conf="A,*[axis=platform]"/>

I'm supposing that, if only the A conf was requested when that module was
specified as a dependency, art51A.jar would be delivered. And if only a
platform conf like windows was requested in the dependency, art51A.jar would
still be delivered. So it would be the EITHER/OR behavior when really I want
the BOTH/AND behavior. Am I interpreting that correctly?


On Mon, Jul 27, 2009 at 2:07 PM, Shawn Castrianni <
Shawn.Castrianni@halliburton.com> wrote:

> There might be a way to use the new "configuration intersection" feature I
> requested several months ago.  It is available in the latest IVY 2.1.0-rc2
> release.  It wasn't designed to do exactly what you requested, but might be
> helpful.  See the IVY website under release notes which reference IVY-1093<
> https://issues.apache.org/jira/browse/IVY-1093> and IVY-1097<
> https://issues.apache.org/jira/browse/IVY-1097>.
>
>
>
> ---
>
> Shawn Castrianni
>
>
>
>
>
> -----Original Message-----
> From: Garima Bathla [mailto:garima.bathla@gmail.com]
> Sent: Monday, July 27, 2009 3:20 PM
> To: ivy-user@ant.apache.org
> Subject: multiple artifact confs: wanting AND instead of OR
>
>
>
> Suppose my Ivy module descriptor (ivy.xml) has an
>
> /ivy-module/publications/artifact element like so:
>
>
>
>    <artifact name=*"cute-dog-and-cat"* type=*"jar"* conf=*
>
> "dachshund,persian"* />
>
>
>
> Now, what this means is that cute-dog-and-cat.jar will be grabbed if EITHER
>
> the dachshund conf or the persian conf is requested. What I would have
> liked
>
> it to mean instead is that the JAR will be grabbed only if BOTH the
>
> dachshund conf and persian conf are requested.
>
>
>
> So I wonder if there's some way for an artifact to be resolved only if an
>
> entire combination of two or more Ivy confs is requested. This way I could
>
> express my dependency on this module with dachshund,persian rather than
>
> having to create a bogus combo Ivy conf, dachshund-persian.
>
>
>
> If I had to describe the generalization of my situation, I would say it's
>
> where the Ivy module has a preponderance of artifacts, each of which is
>
> needed in a Cartesian product situation, and I want to be able to use a
>
> Cartesian product of Ivy confs rather than have to create special
> "Cartesian
>
> product Ivy confs."
>
>
>
>
>
> Regards,
>
>
>
> Garima.
>
> ----------------------------------------------------------------------
> This e-mail, including any attached files, may contain confidential and
> privileged information for the sole use of the intended recipient.  Any
> review, use, distribution, or disclosure by others is strictly prohibited.
>  If you are not the intended recipient (or authorized to receive information
> for the intended recipient), please contact the sender by reply e-mail and
> delete all copies of this message.
>

Mime
View raw message