ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mitch Gitman <mgit...@gmail.com>
Subject Re: multiple artifact confs: wanting AND instead of OR
Date Tue, 28 Jul 2009 04:17:28 GMT
Shawn, these are some great insights you're offering, but I don't see how
configuration groupings would help in the situation Garima's describing. See
the example with the JIRA issue:
https://issues.apache.org/jira/browse/IVY-1097

Quote: "In this ivy file, *[axis=platform] is equivalent to windows,linux"
So this...:
<artifact name="art51A" type="jar" conf="A,*[axis=platform]" />
...is equivalent to this:
<artifact name="art51A" type="jar" conf="A,windows,linux" />

In other words, configuration groups/groupings give you union, not
intersection.

The closest I can come to accomplishing what Garima's requesting is this:
...
<configurations>
  <conf name="mocha" />
  <conf name="latte" />
  <conf name="cappuccino" />
  <conf name="americano" />

  <conf name="short" />
  <conf name="tall" />
  <conf name="grande" />
  <conf name="venti" />

  <conf name="hot" />
  <conf name="iced" />
</configurations>

<publications>
  <artifact name="mocha-short-hot" type="jar" conf="mocha,short,hot" />
...

The problem is you can't specify the intersection on the artifacts:
  <artifact name="mocha-short-hot" type="jar" conf="mocha+short+hot" />

The onus is on the consumer (the dependent Ivy module) to specify the
intersection and not the union.

I would vote that it's worth implementing the feature of offering
configuration intersections on publishable artifacts, in addition to
dependencies. Why?

Simply for the reason that the following does not accurately describe the
artifact's publishable configuration:
  <artifact name="mocha-short-hot" type="jar" conf="mocha,short,hot" />
And having to create a composite Ivy conf for every possible permutation is
a fragile hack.

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

> That is exactly why I requested configuration intersection support.  See my
> previous post to this email group.  Here is a URL that points to it:
>
>
> http://www.nabble.com/configuration-help-td23049370.html
>
>
> The configuration grouping would then allow you to set up 3 groups:
>
> flavor
> size
> temperature
>
> Where the:
>
> flavor group contains (mocha, latte, cappuccino, Americano)
> size group contains (short, tall, grande, venti)
> temperature group contains (hot, iced)
>
> then these groups come in handy when you specify your configuration mapping
> using wildcards.  The IVY-1097 shows what this wildcard notation looks like.
>
> ---
> Shawn Castrianni
>
>
> -----Original Message-----
> From: Garima Bathla [mailto:garima.bathla@gmail.com]
> Sent: Monday, July 27, 2009 6:05 PM
> To: ivy-user@ant.apache.org
> Subject: Re: multiple artifact confs: wanting AND instead of OR
>
> 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.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message