ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garima Bathla <garima.bat...@gmail.com>
Subject Re: multiple artifact confs: wanting AND instead of OR
Date Mon, 27 Jul 2009 23:04:38 GMT
PS : Sorry for this lengthy example - I couldn't any other better
sophisticated way to explain it.

Shawn, you're interpreting this correctly.

I think putting the + intersection notation on the dependency gives part of
what I'm looking for. If I express a dependency like so, then I will only
get art1d.dll:
<dependency ... conf="default->windows+debug" />

Then at least I know that at the dependent module level, I'm able to
restrict the dependency. But then at the publishing module level, I'm really
trusting the dependent module to request "windows+debug" and not just
"windows" or "debug" if I want art1dll.dll to be delivered only in the
windows+debug combination.

Here's the answer to your question: "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?"

Actually, the problem is that it is just another configuration name. Suppose
my Ivy module has 4x4x2=32 JAR artifacts to publish. The JARs are:

   - mocha-short-hot
   - mocha-tall-hot
   - mocha-grande-hot
   - mocha-venti-hot
   - mocha-short-iced
   - mocha-tall-iced
   - mocha-grande-iced
   - mocha-venti-iced
   - latte-short-hot
   - latte-tall-hot
   - latte-grande-hot
   - latte-venti-hot
   - latte-short-iced
   - latte-tall-iced
   - latte-grande-iced
   - latte-venti-iced
   - cappuccino-short-hot
   - cappuccino-tall-hot
   - cappuccino-grande-hot
   - cappuccino-venti-hot
   - cappuccino-short-iced
   - cappuccino-tall-iced
   - cappuccino-grande-iced
   - cappuccino-venti-iced
   - americano-short-hot
   - americano-tall-hot
   - americano-grande-hot
   - americano-venti-hot
   - americano-short-iced
   - americano-tall-iced
   - americano-grande-iced
   - americano-venti-iced

I would hate to have to create 32 different Ivy confs when I could get away
with just 4+4+2=10:

   - mocha
   - latte
   - cappuccino
   - americano


   - short
   - tall
   - grande
   - venti


   - hot
   - iced

Regards,
Garima.


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

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message