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: Purpose of artifact ext attribute
Date Thu, 01 Dec 2011 19:48:35 GMT
You want the artifact's simple name and the extension separate because, for
one thing, typically when you go to publish the artifact you'll be
inserting the revision into the filename. The actual filename won't be
foo.jar, it will be something like foo-1.0-20111201114253.jar.

Also, there's the additional parameter of type, where by default the ext
value is taken from the type. You might have:
<artifact name="foo" type="jar" />
<artifact name="foo-source" type="source" ext="jar" />

Here's a case where you have a common extension, one of which is implied by
the type, but two different types.

Your example of mystuff.tar.gz is a case of where you want ext="tar.gz".
Then you can publish something like:
mystuff-SNAPSHOT.tar.gz
The "-SNAPSHOT" version suffix gets inserted now in the right place because
the tar part is part of the extension.

I'll let someone else field the P.S.

On Thu, Dec 1, 2011 at 8:35 AM, Adam Mlodzinski
<Adam.Mlodzinski@quest.com>wrote:

> Hi there,
>
> I'm just getting started with ivy, and I have many questions. Most have
> been answered by the docs, and some by searching the web. But, there's one
> thing I don't understand:
>
> What is the purpose of separating the 'ext' from the artifact 'name'? I
> mean, why is 'ext' a separate thing at all? It's clearly distinct from the
> artifact 'type', but I fail to see why it's been made distinct from the
> artifact name. Can I safely ignore it or use an empty string when defined
> in ivy.xml, and not use [ext] at all in my build (ivy:publish) files?
>
> Case in point: mystuff.tar.gz.
>
> Is the 'name' = "mystuff", with an extension "tar.gz"?
> Or, is the 'name' = "mystuff.tar", with an extension "gz"?
> Or, is the 'name' = "mystuff.tar.gz", and the extension irrelevant?
>
> I think all are correct, conceptually. But it looks like ivy would have
> trouble handling the first one - at least, coming up with a pattern to
> match it would be not obvious.
>
>
>
> P.S.
> I hate to pile on more than one question, but these are so minor, I really
> don't want to start separate threads for them:
> Where do the docs explain that a physical artifact path is parsed to
> provide values for the bracketed portions of the artifactpattern? Do the
> docs point out that all such bracketed expressions in ivy:publish are
> matched against corresponding attributes defined in ivy.xml  - and that the
> names generally match, except for [artifact], which is matched against the
> artifact elements' "name" attribute?
> I couldn't find this information.
>
>
>

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